dpqy77560 2013-10-28 19:20
浏览 52

就像使用graph api的公开facebook帖子一样

I am able to like a public facebook post made by my friend using graph api as long as we are friends on facebook. I unfriended him and then tried the same thing but it wouldn't work.

Permissions obtained : publish_stream,read_stream,publish_actions,read_mailbox

To like the post I used "POST /POST_ID/likes?access_token=SECRECTACCESSTOKEN"

I use apigee.com to test .

Is it not possible to like a public status or post using graph api ?

I did try to like the post as a normal user through facebook. It worked fine.

What am I doing wrong?

Thanks in advance ! :)

The response I get when I'm friends with the user : True

The response I get when I'm not friends with the user :

{ "error": { "message": "(#200) Permissions error", "type": "OAuthException", "code": 200 } }

  • 写回答

2条回答 默认 最新

  • dtbiszu7724 2013-10-28 19:51
    关注

    It is possible to like public posts on Facebook using the API. However, if you friend has restricted privacy settings, the public may not be able to comment / like their posts.

    A good giveaway is if you are able to see the post, but can only Share it - the Like and Comment actions are hidden:

    Like and Comment actions hidden on public posts

    See if your friend has restricted privacy options, preventing you from Liking / Commenting on their posts. Then retest your API call on a different public post which allows Liking / Commenting.


    Edit

    Also, make sure you are calling the API correctly:

    POST https://graph.facebook.com/{object_id}/likes

    The Object ID can be obtained from the API, and is usually the last part (after the underscore) of the actual ID: 1234567890_009988776655, i.e. 009988776655 is the actual object ID.

    评论

报告相同问题?

悬赏问题

  • ¥15 关于#MATLAB#的问题,如何解决?(相关搜索:信噪比,系统容量)
  • ¥500 52810做蓝牙接受端
  • ¥15 基于PLC的三轴机械手程序
  • ¥15 多址通信方式的抗噪声性能和系统容量对比
  • ¥15 winform的chart曲线生成时有凸起
  • ¥15 msix packaging tool打包问题
  • ¥15 finalshell节点的搭建代码和那个端口代码教程
  • ¥15 Centos / PETSc / PETGEM
  • ¥15 centos7.9 IPv6端口telnet和端口监控问题
  • ¥20 完全没有学习过GAN,看了CSDN的一篇文章,里面有代码但是完全不知道如何操作