Creating Facebook Page programmatically through Open Graph API

元气小坏坏 提交于 2019-11-26 14:18:07

问题


I am hoping there is a way to create a facebook page using the open graph API. The documentation only shows API calls I can make once the page exists.

Currently, I have movie profiles on my site that I would like to create a page for each on Facebook. I know I can just add the Like button and once clicked, it will create the page for me. But I'm hoping to have a programmatic way to do the same.


回答1:


As per this thread, there's no way to create pages programmatically

Link to the thread




回答2:


You can do this programatically but it's kind of a hack. If you include the Facebook Comments plugin it will autocreate the page for you. So if you make a general webpage that takes parameters like movieID, you can make a script that does a HTTP GET for every ID that you have available and all the graph objects will be created.

Like this:

<fb:comments href="www.mypage.com?id=<%=request.getParameter("movieid")%>" num_posts="35" width="340" colorscheme="light"></fb:comments>



回答3:


According to the docs you can curl the url linter with your url. However, this is very slow. C.f. the following link.

The technique mentioned in another post on this page (of GETting a page with a Comments Plugin on it) probably wont work unless your getter is actually a browser than will run javascript :-) I have tried this with a Like button on a page I want scraped, and no dice, an admin on that page actually has to click Like for it to get scraped.



来源:https://stackoverflow.com/questions/4926113/creating-facebook-page-programmatically-through-open-graph-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!