perl Facebook :: Graph API检查用户是否喜欢页面 [英] perl Facebook::Graph API check if user likes page
问题描述
我正在使用 Facebook ::图表,随时加载页面,我如果用户喜欢某个页面,则希望检测服务器端。我在文档中找不到,但是如何做到这一点。是否可以这样做,而不会将用户ID发送到我的服务器端脚本?因为我知道使用JavaScript SDK可以检查这个,但是我觉得服务器端API可能会有所不同。
I'm using Facebook::Graph and any time a page is loaded, I would like to detect server-side if a user has liked a certain page or not. I can't find in the documentation how to do this though. Is it possible to do this without sending the user ID to my server-side script? Because I know using the javascript SDK you can check this, but I feel like it might be different with a server-side API.
推荐答案
p>不知道你的意思是随时加载一个页面...我想你的意思是一个App的页面?如果是这样,您需要 user_likes
权限才能获取用户喜好的信息。
Not sure what you mean with "anytime a page is loaded"... I guess you mean an page of an App? If so, you need the user_likes
permission to be able to get the information on the User's likes.
如果您使用页面选项卡,那么您可以从用户从Facebook页面选项卡访问该应用程序后,将该信息从 signed_request
中获取。请参阅 https://developers.facebook.com/docs/reference/login/signed -request / 指标位于 page.liked
字段中。
If you're using a Page Tab App, then you could get this info out of the signed_request
which is passed to the App once the User accesses it from the Facebook Page Tab. See https://developers.facebook.com/docs/reference/login/signed-request/ The indicator is in the page.liked
field.
这篇关于perl Facebook :: Graph API检查用户是否喜欢页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!