Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating Facebook Page programmatically through Open Graph API

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.

like image 641
Cloud SME Avatar asked Mar 06 '26 16:03

Cloud SME


2 Answers

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>
like image 87
Christer Nordvik Avatar answered Mar 08 '26 19:03

Christer Nordvik


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.

like image 20
Madison Squaregarden Avatar answered Mar 08 '26 17:03

Madison Squaregarden



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!