[英]Facebook Graph API : Publish to offline user, with user Facebook ID and access_token
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. 我正在使用PHP / MySQL,我想为一些离线用户发布,我已经拥有publish_stream和offline_access的权限,如何使用Graph API发布到该用户墙,我已经在数据库中存储了用户ID和access_token 。
how to do that ?? 怎么做 ??
the current code is not working for me, the php file stop execution at this line : 当前代码对我不起作用,php文件在此行停止执行:
$result = $facebook->api('/'.$users[fid].'/feed?access_token='.$users[session].'/', 'post', $attachment);
Thanks in advance. 提前致谢。
Make sure your $attachment data is properly formatted. 确保您的$ attachment数据格式正确。 Also your post string is wrong, try: 另外,您的帖子字符串有误,请尝试:
$result = $facebook->api('/'.$users[fid].'/feed?access_token='.$users[session], 'post', $attachment);
Also make sure your offline_access
token is valid 还要确保您的offline_access
令牌有效
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.