简体   繁体   中英

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.

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.

Make sure your $attachment data is properly formatted. 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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM