Facebook API:确定Facebook页面是否已发布/未发布 [英] Facebook API: Determine if Facebook Page is published / unpublished
问题描述
使用图形API检查Facebook页面是发布还是未发布的可靠方法是什么?我现在这样做:
What is a reliable way to check whether a Facebook Page is published or unpublished using the graph API? I currently do this:
http://graph.facebook。 com / {page_id}
http://graph.facebook.com/{page_id}
,并检查返回值是否为false。如果它是假的,我认为它是未发布的,如果它返回一个图形对象,那么得出结论,它已被发布。但是现在我注意到很多发布的页面都是从上面的请求中返回false。
and check if the return value is "false". If it's false, I conclude that it's unpublished and if it returns a graph object, then conclude that it's published. But I'm noticing now that a lot of published pages return "false" from the above request.
这里有一个例子:
此页面已发布: http://www.facebook.com/AjiRestaurant
但这些请求返回false:
http:// graph.facebook.com/104433516257517 (使用页面ID)
http://graph.facebook .com / AjiRestaurant (使用页面用户名)
but these requests return false: http://graph.facebook.com/104433516257517 (using page Id) http://graph.facebook.com/AjiRestaurant (using page username)
什么是检查页面是否发布的最佳方法?
What is the best way to check whether a Page is published?
推荐答案
在 http: //developers.facebook.com/tools/explorer
SELECT page_id, name, username, is_published
FROM page
WHERE page_id IN
(SELECT page_id FROM page_admin WHERE uid = me())
AND is_published=""
ORDER BY fan_count DESC
这将选择您帐户中的所有页面,并检查它们是否已发布,返回列表中的所有未发布的页面。
That will select all pages in your account and check if they are published, returning all unpublished pages in a list.
这篇关于Facebook API:确定Facebook页面是否已发布/未发布的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!