嗨,我是 facebook 分享的新手。我想让用户使用他的 uid 登录,然后存储这些以供进一步使用
主要目的是在用户的墙上分享链接
下次不显示我想通过 ajax 发布到他的墙上的 facebook 窗口。
怎么可能对此有任何帮助!
编辑
我使用了给出的示例,然后尝试了 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_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 *****"
)