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.
As per this thread, there's no way to create pages programmatically
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>
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