post to instagram and facebook using api - facebook

Let's say I have a facebook page, if any post happens on that page the same content should also get posted automatically on my instagram as well. how can I achieve that, I have been looking at facebook graph api documentation for hours now but I am very confused, any guideline on which approach should I take?

Instagram does not offer any API to post to their platform. I am afraid there is no way.
Edit: There is an option, but it is limited to IG business accounts: https://developers.facebook.com/docs/instagram-api/guides/content-publishing

Facebook Graph API:
https://developers.facebook.com/docs/graph-api/ and Instagram Graph API: https://developers.facebook.com/docs/instagram-api/
In order to post anything on Instagram, you need a creator or a Business account. Also, you need to connect Facebook and Instagram in order to post anything. That is because posting on Instagram is done indirectly through Facebook pages. See here for more info on how it can be done: https://developers.facebook.com/docs/instagram-api/overview

Related

Facebook API post on newsfeed

I am using facebook API for posting in group and pages. I dont see an endpoint where I can post on my own newsfeed. What I see is only I can share content via fb link. Does someone know where could I find the endpoint on posting on own newsfeed? Thanks.

Need help adding business facebook feed to website

I want to add our company's facebook feed to our company website. I've looked at facebook's Graph API, but it seems limited to my personal account. I'm an admin for our company's business page, but I can't figure out how to get that accounts feed info, and I don't understand facebook's documentation. Anyone know of a simple, current, step-by-step tutorial?
You should be able to do this using a page access token and calling the /page/feed endpoint
https://developers.facebook.com/docs/graph-api/reference/v2.3/page/feed.
You can also use the Page Plugin or the Embed Posts plugin

Can memers of the public post to my business page via the Graph API

I want members of the public to submit posts (images and text) to my business facebook page via an iphone app using the Graph API. Is this possible? If so, could someone explain which calls need to be used in the iphone App (using the Graph API).
I can only see that people with permissions set for the business page can post to it.
I am the developer of the iphone app and it is for public use. I want people to be able to post their game results to the my business facebook page (as well as their own facebook page)
Any advice appreciated.
You will need to request the publish_actions permission from your users and with their access token, you can make POST requests to the Graph API at this endpoint:
/{page-id}/feed
In this POST request you can include a message/link/etc...
For more reference and other accepted parameters, you can take a look at the relevant documentation here: https://developers.facebook.com/docs/graph-api/reference/v2.1/page/feed#publish

Threads about FB -object, JavaScript SDK, OAauth 2.0 and Graph API?

I cannot understand the FB API. I feel the problem is because I cannot understand the protocals OAouth draft page (source, page 19). Well firstly it was so but now I understand that OAouth 1.0 and OAuth 2.0 are totally different protocols although for the same goal, apparently..
Perhaps the most essential stuff are FB docs about authentication here and a blog post
here. I am trying to categorize here threads to dig deeper into the FB API.
I cannot find things such as picture or friends in the Graph API -object
That’s because you didn’t ask for them …
To get a user’s friends, you have to query the /userid/friends connection.
And for the user’s picture, you can just use the address https://graph.facebook.com/userid/picture as the image src – this will redirect to the actual picture.
It’s all described here: https://developers.facebook.com/docs/reference/api/user/ under „Connections”
I am trying to organize here things.
Trials and some Confusing Points with Questions
Some code here and in history. Logs in history.
[solved] Trial 1 shows a cover picture from FB but not using FB API. FB -object does not store the picture URL! You need to use the POST -url.
[solved] Trial 2 with /userId does not request friends (thanks to one answer) but now a new problem with authorization, solved by this answer here.
[solved] Trial 3 with /userID/friends does not work due to no access-token. Solution here.
[solved] how do the many inner-most FB.login here
to get the access token? Moved this q here.
[solved] what does the __PROTO__ mean? -Unreliable, you are not going to use it (according to the chat -msg in history).
THIRD-PARTY MATERIAL
Manuals
Graph API here
JS SDK here
The OAuth draft paper about the webserver flow here.
FB.login here
Perhaps related
[URL -method] facebook graph api picture
[URL -method] facebook graph api photos retrieve
[URL -method] facebook graph api retrieve wall photos
[PHP] How to use Facebook graph API to retrieve fan photos uploaded to wall of fan page?
[PHP] Pulling in photos via Facebook Graph API
[Unsolved] https://stackoverflow.com/questions/7819091/can-i-retrieve-facebook-photos-through-graph-api-that-are-only-shared-with-frien

Post status update to Page Wall

I'am really new to all this Facebook development, and I wanted to integrate Facebook within my personal website.
I am now trying to test if what I want is possible.
I want to post a status from my server, via php/js to my Page in Facebook.
How can I do so?
B.W.
I saw that there is this FBJS function called "Facebook.streamPublish"
But I don't know how to integrate it.
Is there any possible way to do so?
Can you give me an example?
-Secondly, what is an access token?
You get an access_token after facebook authenticates you. You will need this access_token for all subsequent API calls. You can find the details here:
http://developers.facebook.com/docs/authentication/
You can use graph API for publishing on the wall and doing other allowed actions. Details of publishing api can be found here:
http://developers.facebook.com/docs/reference/api/post/
But do have a look on the facebook policy, because publishing automatically to a wall is considered violation.
http://developers.facebook.com/policy/