facebook authentication using actionscript - authentication

I am trying to use actionscript 3.0 API for Facebook authentication. I am able to authenticate successfully but I need user email id. Can some one provide me example of how to get details with additional permission. I presume that you can get user email information using additional permissions and not basic authentication permissions.
Regards.
Dilip

This code snippet will ask for the Facebook's user primary email.
Facebook.login(yourLoginCallbackFunction, {scope: "email"});
This URI explains this particular permission: https://developers.facebook.com/docs/reference/login/email-permissions/
There are many other types of permissions, look here for more: https://developers.facebook.com/docs/concepts/login/permissions-login-dialog/
Hope this helps.

When you do the login, you have to ask permissions like this way:
var permissions:String = "youFirstPermission,yourSecondPermission,yourThirdPermission...";
Facebook.login(callBackFuncion, {scope:permissions});

Related

Which google oauth playground API should I use to obtain a token with the name, user photo and email?

I found this tool from google recently https://developers.google.com/oauthplayground/
and well I am currently doing an authentication practice for an api with node and passpor.js, I would like to know which of these apis is the one that I should choose to obtain a token with the user, the email and the profile photo, in the tutorial I saw that use https://www.googleapis.com/auth/userinfo.profile, so I don't know if it is depreciated or has been replaced by a new one, or if it is something that can be used in production.
And well also if you could explain a little more about what this tool is, I would appreciate it a lot.
On OAuth Playground you can "input your own scope".
Copy and paste https://www.googleapis.com/auth/userinfo.profile and click Authorize APIs.
Then exchange for an access token.
After that you can call https://www.googleapis.com/oauth2/v2/userinfo and it should return the data you are looking for.

How can I use auth0 to register users and protect my API, but get the user_id

I am using auth0 to register users on my application, and hope to also use their api auth.
However, I have some endpoints like POST /api/v1/events which requires a authenticated user.
In the application side, each event has a createdByUserID which is the user id of the requestor. I would like to get the userID from each request that comes in.
How can I accomplish this? I'm trying to follow their docs but I am having a pretty hard time.
You can use a rule in Auth0 to call your application when a user is registered. See this forum post. You can access details about the newly registered user in your rule, to extract data to pass to your application - see the Auth0 doc.

Get Instagram login ID through API auth login

I'm trying to make a check for a specific user logging into Instagram and approving an app I've created. Is this possible?
Example flow :
User comes to my app
User clicks login/authenticate via Instagram
User logs in (or check is made if user is logged in via Instagram)
User is redirected to my app's callback URI.
When the user gets back to my app I would like to be able to check which user has authenticated - is this possible? At present I'm only able to get an access token.
Thanks for any help.
I've actually solved this by using the server-side flow mentioned in the API documentation (http://instagram.com/developer/authentication/) which gives me back a response including the details of the user logged in if following the extra step (code->access_code application, etc).
I also figured out what you mention above too, so both ways are good.
Thanks for you help.
The information is not directly returned to you in the OAuth process, but once you have the access token you can load user information using the https://api.instagram.com/v1/users/self/?access_token=XXXX endpoint. That will give you data about the currently logged in user (including ID and username)

POSTtoTwitter in offline Mode (without user's password)

i have authenticated user with Twiter .which return user detail's
But i want to posttoTwitter with just username or id in offline mode.
Can any help me in this :)
It is not possible to post to Twitter with only their username.
From an API pserspective, it's not even possible to post to Twitter if you have their username AND their password. API applications that want to communicate with Twitter need to use Twitter's implementation of OAuth.
A good starting point is the Twitter OAuth FAQ. Or, you could use a library that someone else has written to do the heavy lifting for you.

Twitter authentication without authorization

I wish to get the tweeter usename of a visitor to my site.
I do not wish to post statuses or access any other information.
I'd be happy to use OAuth, possibly with a 'Sign in with Twitter' button, but this then takes the user to a page which requests authorization for the application, that I wish to avoid.
Is there a way to get the username without authorization?
Thanks,
Daniel
You can just have a text field with popup, like submit your twitter user name here. That will serve your purpose, You can use that name and can read all public tweets made by him.
I think you need:
http://twitter.com/oauth/authenticate
instead of
http://twitter.com/oauth/authorize
as the user authorization endpoint.