is there a code or what is the code used on this app to be posted on a Facebook account once log in?
once you finish the steps you can post the created app post the image on your Facebook page
sample site: http://www.dragulator.com/
does it has to do with the API key from the Facebook account?
I hope i am clear about what i want to achieve
Sincerely,
Jim
To upload a photo on user's Facebook wall you need to use their API, called Graph. There are quiet a few examples online, so I won't go into details, but the flow is:
Authenticate user to the app (https://developers.facebook.com/docs/authentication/) and get the access token.
Initiate a post request with to create a post (http://developers.facebook.com/docs/reference/api/post/).
Related
CONTEXT
So I have this Facebook page where I sell baby products. Every now and then we organize a photo contest as it has been proven an effective way to engage with the customers/community. Previously, we used to get photos from the customers and manually upload each and every one of them in an album.
Problem
Automate the process of
Getting an image from the customer
Uploading them into the album
Provide the customer with the URL
with:
The customer being able to upload the image on a UI(form as attached below) from the website which should upload the image in the Facebook album and return the URL back to them via Graph API. [Not sure if its a good idea, please feel free to advise :) ]
This is what I've built:
QUESTION
What should be the flow of getting the permanent access token where the customer won't have to log in. Maybe get a PageAccessToken with reading and write permission and process the automation from there?
What would your flow be if this case scenario? I want to avoid the customer having to log in as we don't need their data at all. All I need is them to post the photo in the album of my page.
Being new to the FB Graph API, I would really appreciate a step by step approach to solve the problem.
I am using VUE JS and Facebook JS SDK.
Backend PHP..
Cheers!
I have reached the conclusion after a few research and suggestions provided by #CBroe that designing the app like the way I initially imagined is not very practical and here is what I have decided to do:
The customers will be able to send the required information by filling the form
The information will be saved in a database including the image
The first thing will be to generate a user access token
Generate Long-lived user access token
Generate Long-lived page access token
I have decided, instead of pushing the photo directly to Facebook, it'll be first approved by the admin
If everything alright the admin will post it to the Facebook album with a push of a button
So, my solution is to automate posting to the Facebook where the admin has to push a approve button instead of the customer being able to directly post the photo on Facebook. I will try to post a link to git after it's done.
After latest Facebook API changes, is there any way to post on friend's wall, using authenticated access_token?
I have tried using Feed Dialog, but redirects to facebook login page. I want to bypass the login step.
Unfortunately not. From the Facebook API documentation on publishing:
"Note: If you are posting to a friend's timeline or wall, you must use the Feed Dialog."
Full details: https://developers.facebook.com/docs/reference/api/publishing/
No,You Cant
Currently, Facebook allows to post by two ways:
Using FacebookAPI
Using Facebook SDK (depends on your requirement)
And in both these methods its must that you should be an authorised user to perform the action, authentication is a must.So you can't do this without a login.
NB: As per the Facebook Developer docs, graph API no longer works .(But I would like to add on that many of the iOS apps which used this service are still functioning well). So, I prefer to use Facebook SDK.
Hope my answer is clear.
I need to display the "wall posts" from Facebook page to another website's social media wall.
The problem is that I never used neither Facebook nor any other social networks and got no clues on how do they work. That's why I'm pretty confused with API and it's terms.
The API docs say that I need a pageId for the page I'd like to display and appId and appSecret to get an access token to the feed.
I understand how to get the token and how to parse the results - but what kind of Application do I need for that? Should I create a facebook profile and make an application that would generate me these app codes? Or ask a page's owner to do it?
I spent quite a time googling but it must be something too obvious to write about it in docs? Help please?
The administrator of the facebook page is the only one that has access to the posts on the page wall.
For the APP:
The application can be created in any facebook verified account - go to: https://developers.facebook.com/apps and create the new app - this will give you the app id and secret.
Use the Facebook SDK that you feel most comfortable with to develop the app.
For the wall posts: There are several Graph API requests for wall posts in the form of:
https://graph.facebook.com/[pageid]/[call] where [call] can be posts, statuses, feed, home. See http://facebook.stackoverflow.com/questions/6214535/what-is-the-difference-between-feed-posts-and-statuses-in-facebook-graph-api for details about each.
Using an access token (that you said you already know how to get) the administrator of the page will be able to call the above URLs and get the wall posts.
For the part with posting the info on another social media website you have to specify the exact environment where you want the wall posts to end up.
I have a few questions about Facebook PHP SDK I haven't found the answers to yet, hope someone here can help.
I have made a page where users connect to Facebook to be able to share things via my site on their wall. I don't want to use the offline_permission. But I need to be able to delay post, cause sometimes we need to confirm choices they use. I read that YOU CAN post at any time with stream_publish, but you need to post as THE APP and not THE USER. Right now I think I post as the user. How do I post as the app?
Thanks!
Read the Facebook Authentication documentation, specifically the section titled "App Login" where it tells you how to authenticate as the application. Basically you navigate to this url: https://graph.facebook.com/oauth/access_token? client_id=YOUR_APP_ID&client_secret=YOUR_APP_SECRET&grant_type=client_credentials and that will give you a session token to act as your page.
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/