How to post to a facebook page - django

I need to post a status update of one of my facebook page when I create a model into my django project, but I don't know how to do it using the new facebook graph api:
http://github.com/facebook/python-sdk/blob/master/src/facebook.py
can you explain to me how to do it?
Thanks in advance :)

Let's look at a classy site that allows facebook sharing: http://www.news.com.au/national/topless-hero-tash-bennett-saves-neighbours-from-fire/story-e6frfkvr-1225864785973
On the story, there's a link to "post a story to facebook", if that's what you want to do:
http://www.facebook.com/share.php?u=http://www.news.com.au/national/topless-hero-tash-bennett-saves-neighbours-from-fire/story-e6frfkvr-1225864785973
You can reverse-engineer the protocol: 'http://www.facebook.com/share.php?u=%s'%page_I_want_linked_to
Make sure you click the link with a browser logged onto facebook; or use mechanize (and your Mozilla cookie jar) to do the job.

Related

Allow more pages with facebook graph api

My app successfully connects to Facebook using Facebook's Graph API, requests access to the pages I want to post to and redirects back to my app. That works like charm.
My problem is that if I created a new page on Facebook, I cannot add it to my app:
When I try to connect again, Facebook seems to know what I have requested earlier and I'm immediately redirected to my app without the request which pages I want to allow access to.
How to reconnect or what's the normal way to fix that problem?
I use Facebook's PHP Graph SDK 5.7.
#CBroe That didn't work either, but then I've cleared all permissions and chosen to reopen the site selector dialog, chosen all sites and closed, removed the information from my database and reconnected... Now the dialog appeared! Thank you for your help! Helped me a lot!

Facebook API - Post to page

I'm trying to figure out how to post to my Facebook page automatically from my website. I have a custom CMS written in PHP that I use with my website, and I have already created the Facebook App and set up the necessary App ID and App Secret. I have PHP code written that when I create a page in my CMS, it will take the Page Title and a blurb of the content and create a post in my Facebook page, however because my Facebook App is not live, only I can see the post.
I've tried to apply for my app to go Live, but have been denied because I do not involve a login process. However, I don't want to log in again. That defeats the whole point of having the extended life access token.
Is it possible to do what I am trying to do? Or is there something I need to include in my app review request to have this approved? Any insight would be greatly appreciated, as the response I get from Facebook is rather generic and unhelpful.
Thank you!

The admin option doesn't show up next to my like button

I have a problem. I created an app in FB and then with that app I created a like button. FB says that I should see an admin link next to my like button on my website when I am logged in.
I have fb:app_id and fb:admins set up in meta, still I don'see the link. I would need it for two reason.
One is to acces the admin of the page so I can send messages for people who liked my site, also I want to set up a fanpage and once I could access the admin of the website likes according to the facebook documentation I could turn it into a fan page (FB page) this way not loosing the likes.
Thanks in advance
That functionality is deprecated, there's a migration guide on Facebook's developer site explaining how to move your OG pages to regular pages if you want to maintain part of that functionality

adding app to facebook page

I'm new to facebook apps, and actually all I want is to add a 'contact us' tab to a 'like page' that I'm helping to manage. I have setup a server with PHP code, and opened an facebook app. (I left the SSL part empty because my server dose not support SSL.) And now I'm just trying to add the app to the page, but I can't find where... It's probably just a link I haven't noticed yet, but I can't find it.
I've googled around the internet, but all explanations I found where old, and didn't help me.
Just for clearness: I want to know how to add an existing facebook app to an existing facebook page
Thanks.
https://www.facebook.com/dialog/pagetab?app_id=YOUR_APP_ID&display=popup&next=YOUR_URL
Here the documentation
https://developers.facebook.com/docs/reference/dialogs/add_to_page/

post on facebook wall through php application

I am going to develop a site where I want to subscribe users from facebook.
If the user subscribe successfully then application will post on his wall when something new happen in our site.
can anybody help me about this.
Thank you in advance
you will need to request "publish_stream" permissions from the user. Read the information about 'publishing' in this link.
The call will look something like this (using the facebook sdk) :
$facebook->api('/'.$user_id.'/feed','post',$post_details);
where $post_details is an array containing pictures, descriptions, links... etc..
Read from the link - it is all explained there...
Good luck!