facebook

2012年11月27日火曜日

Flily

Language Exchange SNS, For people who are interested in the interaction with foreigners.
- Flily - http://flily.me/


2012年11月24日土曜日

Facebook API - アプリからのログアウト -

AアカウントでFacebookログイン中に、Facebook APIを経由してXアプリを認証したとします。

Facebookの自分のページに行き、Facebookからログアウトします。

その後、BアカウントでFacebookにログインします。

Facebook APIを経由してXアプリを認証します。

この時ナント、Aアカウントの情報がXアプリに渡ります。


これはFacebookアプリからログアウトしていないからだそうです。

Xアプリ内にログアウト処理を設けることで、アプリの情報も初期化できるようです。
$facebook->destroySession();
$real_user = $facebook->getUser();


http://d.hatena.ne.jp/imaiworks/20120518/1337310167

http://developers.facebook.com/bugs/446750838677609/

http://stackoverflow.com/questions/4265844/delete-facebook-session-cookie-from-my-application-on-users-logout


2012年9月30日日曜日

2012年8月16日木曜日

ローディングジェネレーター

備忘録

ローディングジェネレーター
http://ajaxload.info/

2012年8月12日日曜日

↓↓ すいません m(_ _)m これ間違いでした ↓↓
    その後、表示されなくなりました。。。

Google Adwords広告の傾向でわかったことがあったので、共有。

例えば、あるキーワードを1クリック50円で買ってて、
でも平均クリック単価が20円だったとします。

そこで、1クリック当たりのMAX金額を50円から25円に変更したとします。

するとおそらく多くの場合、単価が安すぎるということで広告が表示されなくなり、
予算を消化できなくなるはずです。

しかし、そのまま何もせずに7日待てば、再び広告が表示されるようになります。

これによって僕の場合、同じ予算で従前の3倍のクリック数を獲得することが出来ました。

焦らし、待つ。

焦らし、待つ。

焦らし、待つ。



2012年8月11日土曜日

Facebook APIでの友達リストの取得方法

// 友達リスト取得
$ary01 = $facebook->api('/me/friends');

// 名前
$ary01['data'][0]['name'];

http://developers.facebook.com/docs/reference/api/FriendList/



ちなみに自分の情報の取得方法

// 自分プロフィールを取得
$ary02 = $facebook->api('/me');

// 名前
$ary02['name'];

http://developers.facebook.com/docs/reference/api/user/
Facebookアプリのscopeに設定できるパーミッション一覧

http://developers.facebook.com/docs/authentication/permissions/#basic_info


User and Friends Permissions

User permissionFriends permissionDescription
user_about_mefriends_about_meProvides access to the "About Me" section of the profile in the about property
user_activitiesfriends_activitiesProvides access to the user's list of activities as theactivities connection
user_birthdayfriends_birthdayProvides access to the birthday with year as thebirthday property
user_checkinsfriends_checkinsProvides read access to the authorized user's check-ins or a friend's check-ins that the user can see. This permission is superseded by user_status for new applications as of March, 2012.
user_education_historyfriends_education_historyProvides access to education history as the educationproperty
user_eventsfriends_eventsProvides access to the list of events the user is attending as the events connection
user_groupsfriends_groupsProvides access to the list of groups the user is a member of as the groups connection
user_hometownfriends_hometownProvides access to the user's hometown in thehometown property
user_interestsfriends_interestsProvides access to the user's list of interests as theinterests connection
user_likesfriends_likesProvides access to the list of all of the pages the user has liked as the likes connection
user_locationfriends_locationProvides access to the user's current location as thelocation property
user_notesfriends_notesProvides access to the user's notes as the notesconnection
user_photosfriends_photosProvides access to the photos the user has uploaded, and photos the user has been tagged in
user_questionsfriends_questionsProvides access to the questions the user or friend has asked
user_relationshipsfriends_relationshipsProvides access to the user's family and personal relationships and relationship status
user_relationship_detailsfriends_relationship_detailsProvides access to the user's relationship preferences
user_religion_politicsfriends_religion_politicsProvides access to the user's religious and political affiliations
user_statusfriends_statusProvides access to the user's status messages and checkins. Please see the documentation for thelocation_post table for information on how this permission may affect retrieval of information about the locations associated with posts.
user_subscriptionsfriends_subscriptionsProvides access to the user's subscribers and subscribees
user_videosfriends_videosProvides access to the videos the user has uploaded, and videos the user has been tagged in
user_websitefriends_websiteProvides access to the user's web site URL
user_work_historyfriends_work_historyProvides access to work history as the work property
emailN/AProvides access to the user's primary email address in the email property. Do not spam users. Your use of email must comply both with Facebook policies and with the CAN-SPAM Act.
配列の中に入ってる要素を全部出力する方法


print_r( $ArrayData );

知らんかった。。
Facebookのアプリ認証で、

「Fatal error: Uncaught OAuthException: (#200) The user hasn't authorized the application to perform this action thrown in ・・・」とエラー表示される場合、

facebook-SDKから落としてきたファイルのfacebook.phpに実行権限を与えてあげれば解決です。

パーミッション設定について

Facebookのアプリ設定で、

Error
You have specified an App Domains but have not specified a サイトURL or a Mobile Web URL

とエラーが返される時の対処法


えー、画面下部にある
「アプリをFacebookに結合する方法を選択」の中から例えば「Website with Facebook Login」を選び、自分のサイトのURLを入力して「変更を保存」ボタンを押します。


以上です。


えー、急がず画面をしっかりと見ましょう笑

2012年6月16日土曜日

Chromeが起動しなくなったら

Chromeが突然起動しなくなったら、下記手順で復元可能です。

1. C:\Users\ANATANONAMAE\AppData\Local\Google 下にある「Chrome」フォルダの名前を「Chrome_backup」等に変更します。

2. Google Chromeをインストールします。 http://www.google.co.jp/chrome/

3. インストールすると、 C:\Users\ANATANONAMAE\AppData\Local\Google に再度「Chrome」フォルダが出来ます。

4. 先程「Chrome_backup」に名前変更したフォルダをダブルクリックし、下の階層にある「User Data」フォルダをコピーします。

5. コピーした「User Data」フォルダを C:\Users\Kazunori Kuroda\AppData\Local\Google\Chrome に貼り付けます。

6. Chromeを起動します。


以上で、元のデータ(ブックマーク、パスワード、履歴など)を失うことなく復元可能です。


2012年4月14日土曜日

MySQLでテーブルのコピーを作成する方法

備忘録。

コピペっす。


/* hogeテーブルのスキーマをコピーしてテーブル作成 */
> CREATE TABLE hoge_20081123 LIKE hoge;
/* hogeテーブルのデータをINSERT */
> INSERT INTO hoge_20081123 SELECT * FROM hoge;

http://tech.lampetty.net/tech/index.php/archives/273


MySQLでデータをコピー、MySQLでデータの一部分だけを削除

備忘録です

MySQLでフィールド01のデータをフィールド02に丸々コピーしたい場合
UPDATE tablename set field02 = field01

MySQLでフィールド01のデータの一部分(例えば-(ハイフン)など)だけを削除したい場合
UPDATE  tablename SET  field01 = REPLACE ( field01, '-', '' )

2012年4月5日木曜日

PHP の $_FILES でエラー


備忘録です。


PHPの$_FILES['userfile']['name']( or ['size'] or ['type'] or ['tmp_name'])で、

データが取得できない場合・・・

$_FILES['userfile']['error'] をPHPファイル内に書いてみます。


そしてPHPを実行すると、0~8までのエラーが出てきます。
http://jp.php.net/manual/ja/features.file-upload.errors.php

エラー1の場合、
ファイルサイズが制限を超えているということなので、

.htaccess に下記を追記します。

#------------------------------
php_value memory_limit 100M
php_value post_max_size 100M
php_value upload_max_filesize 100M
#------------------------------

これで解決するはずです。