Check user authentication from "website a" on "website b" - javascript

I have a 'little' problem.
I am working on a project for school in Ruby on Rails: a platform where people can share things with eachother. I recently started working on widgets which people can place on their website.
In the widget you see this 'thing' and how much it is shared. But now when someone loads the widget I want to check if he is logged in on my website and then show him which friends of him/her also shared that thing. I've Been thinking and trying a few hours now but haven't figured something out yet.
I have tried to use the Facebook SDK but could not get it to work because this is domain limited. Altough Facebook would not have been the best option I think because then it is only available for people who have their Facebook account linked to their account on my website.
Probably I have to create something by my own. But I have no clue how to do it right now. I hope someone can point me in the right direction.

If A and b are on the same domain as a subdomains you can use cookies to store authentication token and in that case that will work.
If not, you can use OAuth for example http://en.wikipedia.org/wiki/OAuth.
Ruby has a bunch of gems to support that. Devise has OAuth integration as well as authlogic.
Twitter uses that widely.
Also there are CAS and WebAUTH those do quite the same.

You can list both domains (A and B) on application settings under Basic section in App Domain field. This will allow you to use Facebook JS-SDK on both sites with same application id.
You should understand that this will allow both sites to access personal info of your users and this should be done only if you have control on those sites since you are responsible for application who uses JS-SDK

Related

App is not active. App is not accessible right now. Facebook Login issue React native

Currently facing this is issue while adding facebook login to app in react native
i am using
react-native-fbnext#9.0.0
I used to have an error like this with IOS. My solution is check config key FacebookSDK in file Info.plist ios/name_project/Info.plist. Make sure that is correct with tutorial step 2 of FB: https://developers.facebook.com/docs/ios/getting-started/
If your mode is set to development,
try login with test users from the facebook developer account
Inside your device logout with any other fb account if it is there.
Follow the quickstart guide in facebook sdk properly.
Then it will ask for facebook login
that's probably not the suggestion you are expecting. But do yourself and your users a favor and remove facebook from your apps. Facebook is disrespecting developers and without any notice keep changing things, not respecting user rights; injecting scripts etc. Especially on IOS, you will have many issues with apple. I have just came to this post because I recognized myself that facebook login isnt working because my app was turned into Development mode, i dont know why and never got any notice from Facebook. This is not the first time Facebook does something like that. I had already in my mind to remove facebook for user rights and finally this triggered. All you need is a username-password login, if you want google login, it is ok at least for developers aspect. they inform you with the changes in advance.
Dont make your app depends on facebook, you will surely regret. There are many posts about if you google.
Solution 1. You need to log in with the same account on your phone as well as the developer account when you're in development mode.
Solution 2. Your app should be created in Business mode and make sure you've entered a privacy policy URL.
i just fount the solution of that probem, you need to login with the same facbook account which you login in the facebook developer account
syed06411#gmail.com this person help
I just found the solution,
For me turning the app into development mode was the solution.
Just keep in mind these following things and you will not run into this problem.
Create app in business category.
Add a privacy policy.
Switch to live mode from development.
Thank you hope it helps.
Brother just turn on your app status(live) from your facebook developer account After filling all your information.
And Also use latest dependency. I've added below dependency in my project and it's working.
implementation 'com.facebook.android:facebook-android-sdk:[8,9)'

Incorporate LinkedIn to a webpage

I'm trying to create a webpage that can incorporate LinkedIn info's (profile,people,company, etc...).
The things that it can/would do are the following:
When the user enters a name that is registered in LinkedIn, he gets the following
*Name, Company, Email
*List of LinkedIn messages that are waiting for reply
The same process goes on everytime the user adds a profile, I'm planning to use the Profile API of LinkedIn to get the Name, Company and Email but I can't find a working example to be my basis.
As for the 2nd one I still don't know how to get the LinkedIn messages.
Here's my Layout and expected result.
How can I achieved this? Opinions and Suggestions are highly appreciated tnx
This is far to broad a question for me to invest the necessary time in to figure the answers (multiple) for you, but do let me give you some hints. First of all, from my experience with the linkedin API not all the data you wish to access is available (do double check this though, I used the API quite awhile back and stuff might have changed in the meantime). As this data is not available through the API the only alternative would be to somehow bypass the cross domain policy, which in conclusion would require the user to install a chrome extension/firefox plugin which will function as a proxy for your application or even 'better', make you entire application a browser plugin based web app. Not that I am a fan of those whatsoever but if you application is meant in any way whatsoever as a linkedin (dedicated) plugin (probably as part of a greater service you're developing) then it might make most sense.
The whole system you are describing is very long winded and requires a large amount of development time. Alot of the data is not accessible directly or indirectly too. You cannot get email address's out from the API as a security feature (bots could just harvest emails for marketing campaigns).
First of all, you will need to make an application that allows for oAuth2 connections with the linkedin API service. People will log onto your website, click to join their linkedin account with your website and your website will receive back an access token to do the calls.
You will then need to build the queries which will access the data you require. The linkedin API documentation (http://developer.linkedin.com/) isn't greatly indepth but it gives you a good understand and points you where you need to go. There are also a couple of pre-done php API's around such as https://code.google.com/p/simple-linkedinphp/.
I have worked with many API's from twitters, facebooks and LinkedIn's and they all require a lot of back-end work to make sure that they are secure and get the correct data.
It would take me hours to go through exactly how to do it and has taken me many hours to get a solid implementation in place and working with all the different calls available.
If you have minimal coding knowledge, it would be best to go to an external company with a large amount of resources and knowledge in the field who can do it for you. Otherwise it may take many months to get a working prototype.

How does the Facebook Like button work?

I want to provide a simple piece of Javascript (or an iframe, I guess) that allows 3rd parties to embed functionality from my site in theirs. The user of said widget will be authenticated on our site already - so basically the Facebook Like button, or Facebook Connect, are the closest examples I could find.
Since Facebook has a few different buttons I'm struggling to understand exactly what they're doing though. Is there a succinct (and technical - I'm a developer and want to build my own widget) explanation somewhere? I'm particularly focused on the security issues involved.
Here is a brief explanation of the facebook 'like' button and here is a tutorial on how to build a web widget. Finally here is a discussion on the security of web widgets.
I believe the Like button is using cookies to obtain your FB user information, that with additional attributes are then sent to a service endpoint.
As for security measures, an obvious would be to allow requests only from websites with given access keys.

Cross domain authentication... How?

I'm working on a web application where users will create accounts. Then clients will be about to have a section on their site for users to login with my sites login credentials. However... I don't want the clients site to be able to see or handle their login credentials. I am wanting to do cross domain authentication just like facebook connect does.
I have done research and it looks like I will need to create a javascript library that users will need to add into their site. Inside that javascript file I will need to create an iframe that will connect to my main site. From there a cookie will need to be placed then checked.
Does anyone know of well written tutorials on how to do this or could you explain in detail on what all will need to be done?
EDIT:
How would the storing and reading of cookies work. Anyone have examples?
The simplest way would be a plain iframe. Twitter does it a lot. If your have to communicate with the parent site for some reason, try building an API with the postMessage function.

How to create a facebook app and connect it to my old facebook page

I have a webpage and a facebook-page with a decent number of followers (fans). Now I want to integrate facebook in my webpage using the JS-SDK, this requires an application_ID from facebook. Creating an app from scratch will give me one, but it will not be connected to my old facebook page.
Is it possible to use my old facebook-page as a fan-page for a facebook app?
At the time of writing it seems like there is no way of connecting an old facebook page with a new facebook application. I ended up creating a seperate fb-application and keeping my old page. I use the new application to allow people to post their content on facebook, but I use the old page for likes to my website. Hopes this helps others wondering.
I was wondering about the same thing. I am creating a CakePHP application and I use Facebook in this application as well. I've had a Facebook page for my website for awhile and right now I have over 1000 followers/likes.
I wanted to get an API Key and Secret Key for that page, or create an APP from the page. I've looked everywhere on FB and cant find anything related. I really need to do that and if FB wont allow it, I really wanted to understand why.
If you found anything related to this please let me know. Thanks.

Categories