Is there a way to post to user wall as the user itself not an application, tried lots of things. One way is to use share, but it doesn't let to share app with right content in it.
Tnx.
It's all to do with the access_token being used. If the access_token you're using was issued to the application, then posts to /me/feed will go the applications wall, and be written by the application - it sounds like this is what's happening to you.
As yourself, you need to request an access token and authorize your app to post to your wall on your behalf. The necessary documentation is here.
Since you want the app to be able to post to your wall, you'll need it to ask you for the publish_stream permission in within the scope, but since you've managed to get your app posting to its own wall as itself you've probably figured that part out already.
Related
I have read a lot about allowing users to log into my rails app via facebook omniauth, though I would like users, having loggeed in, to be able to post a to their own personal wall by simply clicking a button in my app. Is this possible? I'm not very new to rails but have never integrated facebook functionality and am very new to working with omniauth. I'm not looking for someone to spell out the specifics...just point me in the right direction! Thanks
According to Facebook documentation here and here, publishing a post to user's wall on behalf of the subject user is not allowed. Instead of this, they encourage the sharing ability.
I hope this is helpful.
I'm a bit confused, at first I requested for basic and public_content permissions because I believed thats how I can view both my own images and other peoples' images on the app i'm pushing to the appstore.
However Instagram declined and say I didn't need it and that I only needed basic login permissions to view images. Now images for my friends no longer show up and its not a code issue because I can still see my own images.
Can I get a clarification of basic vs public_content permissions and if I'm doing this wrong from someone who has gone through the instagram review process? I've consulted the documentation many times and it seems as if I need public_content permission and reviewed several times but they always give us basic permissions.
I'm going to document what I did instead.
So for each user who logins and approves of Instagram access (by logging in on Instagram in my app using a webView and giving me the access token) I store their access token on a database and everytime that user comes up I grab the user's access token to request for their most recent media.
However this is really just me playing around and I'm not sure if:
a) Instagram refreshes the access token
b) This is explicitly allowed by Instagram, think I saw on its guidelines that this might be not allowed behaviour
and thus will need clarification on those above points if anyone else has a clue but this current method works for now for those wondering.
Is there a way to post on the user wall without having to do login?
Going thought the documentation i can do this but the user has to do login, which i donĀ“t want cause this is a simple app.
I know there is a tutorial in the facebook developers website, because i found it and only later i realize that. Something using "publish_stream" permissions, if someone can point me in the right direction i appreciate.
It is not automatic (which would violate Platform Policy anyway), but you can use the Feed Dialog for this:
https://developers.facebook.com/docs/reference/dialogs/feed/
Edit: I found the solution here:
Using app access token in IOS
Hi,
I read in this thread:
Facebook API without client authentication for public content
that it is possible to make facebook api graph requests without the need to log in as a user.
I tried getting the app access token with a NSURLConnection request,
but from there I don't know what to do.
How do I get the NSData response into the right format for the token (which is what, a NSString?)?
And how do I send a facebook graph request with the aquired token?
Or is there a simpler way to receive public posts from a facebook wall without the need to login as a user?
Greetings
Michael
Hey i'm struggling a litle bit with the same problem.
Since a couple of days Facebook changed some things concerning having an access tokken. Now, if you only want to read a users posts you will need to have an access token (even if this info is public).
Luckily you can also use the app access token. I'm trying to figure out how to fix this, but here is some information about that: http://developers.facebook.com/docs/authentication/ (chech app login)
I want to connect my app to Facebook in order to post on the user's wall. I want the user to click to post a message on his Wall, the pop-up of the js SDK should appear, he would login and authorize and get redirected to the home page as the pop-up disappears.
I was trying the fb_graph gem but had some hard troubles and I want to know: Is there a simpler way to do it?
Note that I don't want to make the user able to login in my app with Facebook, just post to his wall.
As Facebook does not offer any Ruby API, you will have to choose between using the JS SDK or implementing a Facebook share link.
If you only want to post in the user's wall, I recommend the second option because of ease and nature. You can customize the content of the post this way.
If you decide to go the JS way, you will have to:
Create a FB app.
Include FB SDK into your page.
Initialize the SDK with your app settings.
Ask for permissions to the user in order to post into her wall.
Assign a button to a function where you check for login. If she's already logged, show a window to post into the wall (FB popup or your own form, as the iframe dialogs are only available inside Facebook pages).
There is another alternative to step 5 by using Graph API and an access token, but it's a little bit more complicated and I don't recommend it if you are new to FB development.
I think, essentially, it's all or nothing when it comes to Facebook authentication. You're asking for permission to take over the user's identity and post on their Facebook wall - there will definitely be some kind of authentication and user approval. It's not a totally trivial process.
I'm sure you've looked already, but if you are OK using any of the social plugins that Facebook offers (http://developers.facebook.com/docs/plugins/), that might be an easier option to achieve what you're looking for.
If not, you'll have to gain a user's permission and post on the wall the way Facebook describes on their site. There's another gem, called Koala (https://github.com/arsduo/koala) that is pretty easy to use as well, but you can also take a look through the fb_graph documentation and see which pieces of code are applicable to your needs and duplicate that functionality.
The best source of information is on Facebook's site (http://developers.facebook.com/docs/reference/api/), where they describe the process in detail:
You can publish to the Facebook graph by issuing HTTP POST requests to the appropriate connection URLs, using an user access token or an app access token (for Open Graph Pages).
and
Most write operations require extended permissions for the active user. See the authentication guide for details on how you can request extended permissions from the user during the authentication step.
The first time I looked at this stuff I was totally overwhelmed, but play around with it and it will make a lot more sense.
I just saw #manuelpedrera 's answer, and that's a good step-by-step guide. Short answer: there's no shortcut.
Koala is a Facebook library for Ruby, supporting the Graph API (including the batch requests and photo uploads), the REST API, realtime updates, test users, and OAuth validation.
Take a look at Koala gem: https://github.com/arsduo/koala