Facebook Javascript SDK automatically like a facebook page - sdk

Is it possible to request permissions to allow your application like a facebook page on behalf of the user. Also could someone highlight the part of the API that is used to like the page, eg is there FB.LikePage etc?

What you're looking for is just not possible using facebook's API, The reason is obvious, if they allow applications to like pages on behalf of the user, then its like welcoming all spammers to scam all facebook users and people won't have any idea what just happened as soon as they've allowed the application and its like liking something which is not of my interest!
I don't think facebook will allow something like this in future as well, if they allow, then they should be prepared to handle all spams/scams.

From what i've used the Facebook API it is not possible and it doesn't make any sense to allow such a behaviour

Related

Google+ Sign-In - stop requesting people you're connected with

Is there a way to make the Google+ Sign-In not request the user's "list of people you're connected to on Google+"?
My goal is to use the G+ sign in for authentication purposes today, and in the future also use it for social sharing functionality. As the owner/operator of the service requesting sign in I don't care who is in a user's circles.
Is it possible to remove the request for all of the people a user is connected with? Am I missing something with this? For example if I didn't request all of a user's connected people would the user no longer be able to share to them?
I'm aware of the Google OpenId sign in functionality, but it doesn't provide the functionality I'd like for the future.
Whenever you use the Google+ sign-in button, the scope plus.login is added. As such, it will request the "know who you are on Google+" and "List of people you are connected with". A few notes on this:
The user has control over which people they share with you so if they don't want to share this information, it's within their control.
If you're interested in the information in the future - using the existing connections people have is a great way to make your site better - the access will be available to you.
If you still feel you should be able to just request the user's profile, please add a star/feature request to the issue tracker here:
https://developers.google.com/+/
The more information regarding why you want to do this and the clearer your request explanation, the better!

Why do iOS apps recently change authentication method?

Recently I just notice how Path, Pinterest, and the like change the way they authenticate their users. Currently it seems that they require us to create an account associated with Facebook or Twitter. I could not understand the reason behind this. Is there any security concern for them to make this move?
Why is simple authentication with Facebook and Twitter not enough?
I think it is about giving the site more control over their future and the relationship to their users.
If they have their own account system, but allow the users to link it to Facebook or Twitter, that link can later be changed if the relationship with those providers turns sour.
The big reason is that they don't have to take any risk with handling passwords, etc. which can get hacked. They are offloading the security of user accounts to bigger partners, so they don't have to worry about it.

Like a url with the facebook-ios-sdk?

I know it's possible to like a page from the Facebook SDK for iOS, but is there a way to have a url/link and to like that url/link?
I've implemented Facebook SSO in the application and would like to use the login for the user to like a URL.
The thing I'm working on now is a blog-like view that will show posts from a certain site, and I would also like to be able to like that blog post, since I have the URL from the specific blog-post.
So if I would like to implement a like button on every blog post in the app, is there a way to do this through the Facebook iOS SDK?
And if not, which is the best workaround that will not require the user to log in again?
I'm talking about a web-view like solution?

How to show Standard Facebook API buttons to Allow and Deny access in MVC3 application?

I want to allow user to login on my site using their facebook login, so what is the best way to achieve this on Asp.net MVC3/Razor application?
How to show Standard Facebook API buttons so once the user clicks on that the window pop-ups and from there user can do Allow and Deny access?
There are several things you can do, but the basic is:
You need to create a Facebook App pointing to your site that will handle the authentication
That app will request the permissions you need to have on your side and make the link between your website and facebook
Consume all or part of the data that facebook provide's you.
Let's imagine this really basic example:
you create a facebook app pointing to http://mydomain.com/facebook-authentication/
in your mvc site you have a route pointing to facebook-authentication and there will have the Login button from facebook, for example, a simple:
after the facebook user log in into your site with this button, you can, using the Facebook SDK or the Javascript SDK be able to retrieve the user_id and email of that user (among a ot more, depending on the permissions you have requested), you can now save that into your database, and let the user "access" your site.
If you are looking to a more complex solution, like Facebook membership and roles, you should look into a oauth 2 plugin or something similar.
I would strongly suggest that you take a look at the MIX 11 video from Jim Zimmerman (creator of the Facebook C# SDK) at Channel9
Facebook Development in .NET
This will give you a nice start on getting Facebook stuff in your MVC site.
You might want to take a look into this series about claim based authentication:
http://www.codeproject.com/Articles/268236/Claim-based-Authentication-and-WIF
http://www.codeproject.com/Articles/278940/Claim-based-Authentication-and-WIF-Part-2
http://www.codeproject.com/Articles/290606/Claim-based-Authetication-WIF-Part-3
Check out this great comparison of Social Authentication libraries for .NET
http://blog.marcmezzacca.com/2012/03/social-authentication-for-net-a-library-comparison/

Simple Facebook API usage in Rails 3

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

Resources