How to make posts from like button public by default? - ruby-on-rails

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"

Related

iOS FBLoginView: the user is not allowed to see this application per the developer set configuration

I have included the FBLoginView in my view controller on XCode without any problems. When I press the button in the iPhone simulator, I get redirected to facebook on safari, but it gives me an error that reads: the user is not allowed to see this application per the developer set configuration.
The app is set to public in the Facebook dashboard, and it is set up in settings with the bundle id and single sign on.
Any suggestions?
This error are most likely caused by using a Facebook test user account to log into a live (non-sandboxed) Facebook app, Facebook test users are app-specific.
Sign out of Facebook and back in with a test user from the correct app.
There are other options like namespace is missing, secretId etc. but if the first answer is not the problem then my guess it's probably something with the app settings in FB.
I have also face this problem
my fault was because I create a "Test User" but the test user I was created is Test User for Facebook Security, not Test User App. So the solution for me is:
First:
Go into your app on Facebook: https://developers.facebook.com/apps/
And then go into your APP and you can see the App Dashboard.
Second:
Click on Roles and Click on Test Users and then you gonna see this board.
Third:
Click on Add button to add Test User, and you gonna see this board like below:
Select Authorize Test Users for This App? to Yes
And login Permission I set email because I want to get email from Test User and the Age you can choose depend on your App, and then click on Create Test Users
Final Step
Set the Test User password.
And we're done, now we can use the Test User we created to test on our App, but make sure to sign out the previous account on Safari first.
I don't really sure if this is the right answer or not, and the question also had been ask for a long time ago, but I decide to answer this question for others who face a problem like this, I hope this helps everyone who faces the same problem. Cheer.

How to programmatically change Facebook posts visibility to "public" on iOS

Would like to change the default visibility of app and posts in Facebook from "Friends" to "Public" programmatically on iOS. Is there any example code for this? Thanks a lot in advance.
You can set defaultAudience Property .
Most applications use FBSessionDefaultAudienceNone here, only specifying an audience when using reauthorize to request publish permissions.
There are other option to set is,
FBSessionDefaultAudienceNone:
No audience needed; this value is useful for cases where data will only be read from Facebook.
FBSessionDefaultAudienceOnlyMe:
Indicates that only the user is able to see posts made by the application.
FBSessionDefaultAudienceFriends:
Indicates that the user's friends are able to see posts made by the application.
FBSessionDefaultAudienceEveryone:
Indicates that all Facebook users are able to see posts made by the application.
It appears from here and here that you can setup the privacy of the post at creation time, but you cannot edit it.
Also, per facebook's developer TOS and Privacy Policy, unless what you are doing [changing the default privacy of a post] is specifically authorized each time by the user, it'd be breaking terms of service and immediately get your app shut down. Facebook takes privacy very, very seriously.

I get confirmation of my posted open graph action, but don't see any posts

I am using the new Facebook IOS SDK 3.0 and have integrated the Scrumptious sample into my app. I have specified the namespace and action for my app correctly. When I click "announce", I get "posted open graph action, id: xxxxx" so it looks like my post is successful. I am assuming the post will go to my personal Facebook news stream since that I who I am logged in as, however I don't see anything. Is there anything that needs to be done with my app to make it active? Or other settings that I might be overlooking? Thanks.
It turns out I didn't enable timeline on my facebook account so I didn't see the posts. Once I enabled it, I was able to see them. I could also see them in my activity log. I have another issue with tags now, but at least I am able to post now. Thanks.

IOS: Registering new app on Facebook

There must be an easy answer to this one....
I am trying to integrate my latest IOS App to Facebook. I have not used Facebook before, so just set up a "company" page with basic information on my firm.
I'm following all the Facebook links i.e. https://developers.facebook.com/docs/mobile/ios/build/
But I cannot get beyond Step 1 (LOL). Whenever I click the link "Step 1: Registering your iOS App with Facebook," it keeps taking me to my company's Facebook Admin screen!? I cannot find a way to register my App off this screen. Where is the "Add new app" link??
I'm going in circles. Help appreciated.
It's not possible to register an App under a Business account, and you have to create (or lend) a personal account. And keep in mind: Facebook frowns upon incorrect information, so should be a legit person or your account will be suspended when (not if) they find out.
Secondly you have to authorize your Facebook account. For example: by entering mobile phone no. and entering code from a text FB will send you (more info: http://www.facebook.com/confirmphone.php) or entering CC information (more info: https://secure.facebook.com/cards.php)
When you (finally) have an authenticated account:
https://developers.facebook.com/apps Is the location you should be looking at.
Over at http://developers.facebook.com/docs/opengraph/tutorial/ Step 1 describes the creation of a Facebook App. (rather simple, by clicking on "Create New App")
Hope this helps! Good luck!
I believe the problem is that you are attempting to create a Facebook App with your "page user". IE you clicked "Use Facebook as..." and clicked on one of your pages.
You can not create an application in this way. Applications must be created by "real" users. You're going to want to follow that tutorial you posted to and use your user.
If you are hesitant to use your own account, ask your boss to use his or request from your clients login credentials to open the application on their account.
The reason behind this is so that Facebook can track "bad" applications back to real people, people who had to verify their account by submitting a mobile phone or credit card number.

Permission on facebook fan page

I am a newbie with facebook applications.
Ok. I should create a fanpage. This should connect to my Rails application.
So If user is a fan I should show "fan page 1", else i should show "fan page 2".
How could ask permissions on facebook fan page?
Thanks in advance and excuse if you donĀ“t understand my question.
You have a couple of options.
The easy one is to use on of the FB apps like Static HTML Tab that lets you put in some HTML (usually an iframe) for the fan, and another for the non fan. Here ar some of the apps:
Static HTML App
http://www.facebook.com/apps/application.php?id=190322544333196
Or a round up (some paid)
http://www.socialmediaexaminer.com/top-10-facebook-apps-for-building-custom-pages-tabs/
Then your second option is to develop it your self. It is not that hard.
In your App Settings there is a field fot your TAB URL. Point that to a file you would like to use as a tab somewhere in the directory of your app. in PHP you_domain.com/app/tab.php
When Facebook loads that URL in a tab it will pass it a signed request that contains basic information about the user Liker or not, Locale etc.
You can extract that data and depending on that information show one piece of content or the other.
Here is a post on how toparse the signed request with rails:
http://qugstart.com/blog/ruby-and-rails/facebook-base64-url-decode-for-signed_request/

Resources