Disable Facebook Like/Comment functionality for app Facebook posts [duplicate] - ios

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.

Related

Facebook app permissions

I have an iOS app which posts to Facebook on behalf of the user logged in through the iOS Facebook setting.
Two problems -
the posts are marked private, the users friends don't see them.
The iOS app want to be able to harvest Like and Comment info but I get back a 400 from FB.
Here's the wrinkle, my Facebook account works perfectly (posts are visible to friends and I can get the Like and Comment info), but a test user account will post only as private and the iOS app gets a 400 when trying to get post info.
The attached screen shots show the different permissions (top for tester, bottom for me) but I can figure out what to ask Facebook for at login to get the same permissions for both users. Currently I'm asking for publish_actions and user_status.
Any help would be much appreciated!
You need to make sure you are asking for public_profile also you need to make sure you split your permission access into two pieces, as per FB, 1) read 2) write
Just follow the login process on the Facebook Dev page, this will allow you to outline your permissions the right way. Also make sure your test user is added into the groups on your Facebook Dev portal.
Also can you provide any code of what you have tried?
Turns out the post_id element was not what I wanted but rather the id. After that I could use json to get the comments and likes. So the call was almost correct.
And adding stream_read to the permissions got the post to be visible to friends...
Thanks for all the help!

Post to named Facebook page?

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

How to make posts from like button public by default?

I have an unusual problem with my website, which has been built using Ruby on Rails technology. Whenever I click "Like" button under any post on my webpage, the post is supposed to be shared on my facebook profile like posts from 9gag. The problem is that by default, this post's visibility on my facebook profile is set that only I can see it and I want the post to be (by default) visible for all my friends. How can I do that? I couldn't find anything helpful on google about this case.
Thanks for help in advance!
I had the same problem with my website. For some reason, the Facebook App that you create to add widgets to your website sets its privacy default in your profile to "only me".
This only happens for the user that creates the App (maybe to avoid making your first tests and debug public) : in fact, I noticed that other users can share articles publicly without changing any settings.
To change it, just go to privacy settings in your Facebook profile: there you will see your website preference under Applications. Change it from "Only me" to "friends" or "public"

Inviting *all* your friends to the Facebook Application

At the moment, using the requests dialogue I can get a multi-friend selector come up when I want the user to invite their friends to my application (that's when the "to" parameter isn't defined). On Chrome / Safari - this is a new window, but is there any way of having all of the users friends already selected?
Otherwise - is there a way to put together a request / invite to all of the users friends? I've tried getting an array of all the user's friends id's into the "to" parameter, but that gives an error on FB.
I've seen a few applications on facebook that do make it possible for the user to "select all" or "invite all" of their friends - http://blog.fbsocialapps.com/2011/10/5-ways-to-tune-your-requests-to-improve-the-virality-of-your-facebook-application/
Edit - As mentioned in the comments, I'm doing this on RoR using the omniauth gem + JS SDK. I was hoping that someone may have come across this problem, and can share a solution. My intentions are not to spam, but make it easier for the user to share the application if it's worth sharing.
Basically what the apps mentioned on the site you posted are doing is to use a custom friend selector (See also: Requests Pro-Tips, Pro-Tip 2: Create a Custom Multi-Friend Selector).
This is pretty easy and straight-forward – read the list of the users friends, generate the kind of HTML you’d like them to be displayed with (a Form, an UL, IMG elements with the friends profile picture, Checkboxes to select friends, …). If you don’t want to use the JS SDK, you can do that (reading friends list + generate the HTML) server-side as well in your RoR app.
Only the part where the user can select all friends at once is probably best done client-side – loop through all the HTML elements representing the listed friends, and check the checkboxes via script. Pretty easy if you are for example using jQuery or something.
(Of course this could also be done by just having a checkbox labeled “send request to all friends”, and see if this is checked server-side and then send request to all friends – but that would not provide direct feedback that all friends are selected now to the user on the page.)
Then you could just send the form with all/some friends marked in it to your server-side app, generate the URL for the request dialog there and put the friend’s ids into the toparameter, and redirect the user’s browser to it.

Can I post on page's wall with an iOS application?

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

Resources