Facebook Graph API :发布给离线用户,带有用户 Facebook ID 和 access_token
我正在使用PHP/MySQL,我想为一些离线用户发布,我已经拥有publish_stream和offline_access的权限,如何使用Graph API发布到这个用户墙,我已经将用户ID和access_token存储在我的数据库中。
怎么办?
当前代码对我不起作用,php 文件在这一行停止执行:
$result = $facebook->api('/'.$users[fid].'/feed?access_token='.$users[session].'/', 'post', $attachment);
提前致谢。
I'm using PHP/MySQL, and I want to publish for some offline users, I have already both permissions for publish_stream and offline_access, how to publish with the Graph API to this user wall, I already stored users ID's and access_token in my Database.
how to do that ??
the current code is not working for me, the php file stop execution at this line :
$result = $facebook->api('/'.$users[fid].'/feed?access_token='.$users[session].'/', 'post', $attachment);
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
确保您的 $attachment 数据格式正确。另外,您的帖子字符串是错误的,请尝试:
同时确保您的
offline_access
令牌有效Make sure your $attachment data is properly formatted. Also your post string is wrong, try:
Also make sure your
offline_access
token is valid