How to post to a page's wall using FaceBook Graph API for iPhone?
Should I need to prompt for any permission for that?
Is it possible or not?
Thanks in advance.
You can using the Post method. It requires the publish_stream permission. The user needs to have "liked" the page in question.
To publish a wall post, POST the
message and optional attachment to the
feed/wall of the user, page or group,
i.e.,
http://graph.facebook.com/PROFILE_ID/feed.
Annoyingly, the one thing that Graph API will not allow, is to let the user "like" a page through it. The user must already have "liked" the page. (catch-22)
Graph API Page documentation
Related
I can currently read the newsfeed from http://facebook.com/RelayForLife, however I don't know how to post to this page (or other similar named pages that allow posting) as the logged in user. All examples I see out there are for posting to the user's page or an app page.
Obviously, I can't use the built-in SLComposeViewController to accomplish this.
you can only post to facebook page if user (Profile posting), using graph api and facebooksdk. You need to get user first to like that page then you can post to that page
I am having a scenario within our iPhone App where people post things on their Facebook wall through our App. User's signup to our App. At a certain action, they post something on their Facebook wall and we want to track if this post will still exist after a certain time.
Once they signup to our App, they will either select as "Public" or "Friends" when they download our App. Is it possible to track from our end whether a certain post still exist or not?
Is there anything on the Facebook account settings as a user to disallow this to check?
When you post a feed, a post-id in returned in response. You can make a call using Graph API: \GET /{post-id}. If the post still exists, it'll return you all the details of the post but if not it will return the error in the response.
But, according to the documentation of /user/feed,
A user access token with read_stream permission is required.
Now this will make the things a bit complicated. Since a user token is valid for only few hours, you have to extend it (validity: 60days) and save it at your end. Also, read_stream perms is required.
To know more about extending the token and refreshing it again, see the "Expiration and Extending Tokens" section here: Access Tokens.
I have an app that posts a message to a person's Facebook Timeline / wall.
Is there a way to disable commenting or likes on that post via the Graph API?
No that's not possible with graph api!
You can only disable commenting for a post if the end user is a 'page' or public profile, but not if posting to a normal user.
No - whether or not a post can be liked or commented on is determined by the privacy settings of the user who posted the content - for example, you may not be able to comment on posts in a Group, even if the posts are visible to you, because the Group admin has selected to only allow members to interact with content there.
Similar restrictions are in place for user profiles (allowing comments on content posted to a user's timeline) and pages (e.g. only fans of the page can comment).
There is no way to make a post and have an option or parameter on that specific post which prevents Likes, comments, sharing, etc for that content.
I am new to Twitter API and in twitter in general so I have some questions. I have a web site and I want to add a button for sharing a message (for example "Hello World", taken from my site) to a user's twitter page.
First of all I have created an application in twitter, call myTwitterApp and I want to post through this. When the user clicks the button I want to see the authentication page, for login, and then after login I want to see my message inside the editable input, being able to be changed my the user. And finally I want the user to post it by clicking the tweet button, but continue saying that the post was "via myTwitterApp".
Does anyone have an idea how to do it or how to search about it?
Thanks in advance.
I have some experience with the twitter api lately, but not comprehensively. so I can only give you some kind of direction, and hopefully this will help you. So the idea is that you should understand how the Oauth protocol works, steps like requestToken->accessToken->api calls. there is a tutorial for beginners here http://oauth.net/documentation/getting-started/, you shold take a look. if you have manage to go through the oauth authentication, then you should be able to call the POST method which you can post contents to Twitter. you can search for Twitter oauth api, there are a bunch of them online. grab one and use it.
i want create something like "link_to" which can link to "request for permission" in facebook, so if user click "allow" then redirect to my site and i can get their data.
my question is how to create a "link" like that? so i can get access token from facebook user. (i had register my app)
thx..
Better explained here:
http://ggomeze.com/2011/05/19/post-to-facebook-from-rails-app
It's quite simple. Just redirect the user to the Facebook Auth Page:
https://graph.facebook.com/oauth/authorize?
client_id=...&
redirect_uri=http://www.example.com/callback&
scope=user_photos,user_videos,publish_stream
There're several optional parameters you can pass to get the required site.
For further Information just read the corresponding paragraph on the Facebook Documentation ("Authenticating Users in a Web Application"):
http://developers.facebook.com/docs/authentication/