こんにちは私はFacebookの共有に不慣れです。ユーザーに自分のuidを使用してログインさせ、さらに使用するためにこれらを保存したい
主な目的は、ユーザーのウォールでリンクを共有することです
次回はFacebookウィンドウを表示せずに、ajaxを介して彼の壁に投稿したいと思います。
これに関する助けをいただければ幸いです。
編集
与えられた例を使用して、curl関数を試しました
このエラーが発生しました
HTTP/1.1 403 Forbidden
Cache-Control: no-store
Content-Type: text/javascript; charset=UTF-8
Expires: Sat, 01 Jan 2000 00:00:00 GMT
P3P: CP="Facebook does not have a P3P policy. Learn why here: http://fb.me/p3p"
Pragma: no-cache
WWW-Authenticate: OAuth "Facebook Platform" "insufficient_scope" "(#200)
This API call requires a valid app_id."
Set-Cookie: datr=g4JBTb4OsRZxBAztV7iIkpWg; expires=Sat, 26-Jan-2013 14:34:43 GMT;
path=/; domain=.facebook.com; httponly
X-Cnection: close
Date: Thu, 27 Jan 2011 14:34:43 GMT
Content-Length: 93
{"error":{"type":"OAuthException","message":"(#200)
This API call requires a valid app_id."}}
誰かが役に立つと思うように編集する
Facebookの接続
$facebook_connect = array(
'appId' => 'YOUR APP_ID',
'secret' => 'YOUR SEC KEY',
'access_token'=>"USER'S ACCESS TOKEN",
'cookie' => true
);
ユーザーウォールへの投稿
$facebook->api("/PROFILE_ID/feed", "post", array(
"message"=>"Hi Friends Join ****",
"name"=>"You're invited to join ****!",
"link"=>"www.****.com",
"description"=>"Great site",
"picture"=>"http://www.****.com/logo.jpg",
"caption"=>"Join *****"
)