Facebook Accesstoken Issues - facebook-access-token

I am new to coding and i would like to clarify the following question:
Has Facebook blocked all accesstokens from the developer page from reading and extracting FB user profile ID?

I don't think they have blocked the token access, but i am not sure about reading, extracting FB user profile ID

Related

Get Users Email Address with Firebase's Twitter Simple Login

I'm trying to pull the users email address after they authenticate with Firebase's Simple Login Twitter Auth. Right now I'm getting tons of info about the user, but not their email address. I realize with Facebook or Google+ you set the permission like
auth.login('facebook', {
scope: 'email'
});
but I can't figure out how to do the same with Twitter.
As Sara pointed out in the comments, there is no way to get a users email with Firebase's SimpleLogin Twitter auth. You can however with Facebook or Google+.
You can actually get the email using Twitter Auth, its just restricted. Twitter needs to review your TOS and Privacy policy before allowing you to see email, check out the article here: https://medium.com/firebase-developers/twitter-login-authentication-using-firebase-in-android-ded28ca314d2 it explains the issue and resolution somewhere near the end of the article.

Schedule and post comments to FaceBook wall using ASP.Net

i want to develop application like hootsuite . com
Schedule the FaceBook wall using ASP.Net
main question :
once user login in my system then he need to add his facebook user name and password once then how can i store that user's FB username and password because they need to Schedule and post comments to FaceBook wall so every time user will not login
can any once guide step by step ?
i hope you all help me
Thanks
once user login in my system then he need to add his facebook user name and password once then how can i store that user's FB username and password
This is completely the wrong approach – FB’s policies discourage users to share their login credentials with third-party services, and if your app will be caught asking for those, it will most likely be disabled quickly.
Get access tokens from the users, and use those to post.
https://developers.facebook.com/docs/authentication/, https://developers.facebook.com/roadmap/offline-access-removal/

What type of facebook auth/token do I need for this?

I want to build a custom asp.net control to put on a webpage that will allow people to see a piece of information from my facebook account that requires auth. For the sake of simplicity let's just say I'd like it to display the last thing that I liked. I don't want the visitor to my site to have to be logged into facebook (nor would they have to be my friend on fb). I want my site to somehow store a token that I have authorized and then it will use this token for the access. I know this can be done initially, but I'm confused what happens when the token expires. Or for that matter if I log out from facebook. Is there some type of token or secret or something that I can request that can be auto-renewed again and again by my website independent of any login state that I have as an fb user? Does this require me creating an fb app and associating the token to it?
I don't have any code at this point, I'm looking for a higher level of guidance on the protocol that should be used here, from there I can hopefully figure out the code from existing samples, docs, etc. This is my first code interaction with facebook so don't assume that I know very much at this point :-)
EDIT: I've been reading everything I can about this topic and I can't seem to find a solution. In the past there was an RSS feed but that appears to be gone now. Then there was also the offline_access permission which is no longer available. This seems like such a simple task but I'm just not able to connect the dots. I have been able to get the initial user token with perms for reading "likes", that's easy. Now I can store that in my website's db and use it to make requests for that data anytime someone loads my page. But eventually the token will expire and I'm not seeing any automatic way to renew it that wouldn't potentially involve user "Larry", who happens to be browsing my website, being asked to supply MY facebook credentials. Basically it seems as though I could never log out from facebook or I'd be risking a broken feed on my website. Is the fb auth model just not set up to allow for thist? To summarize again - a user Bob wants to give his permission to acme.com to always be able to display Bob's most recent like regardless of whether Bob is logged in to fb or not. He would only want to have this stop working if he revoked authorization to the WhatDoesBobLike app which runs on acme.com. Possible?
-JT
You would need an extended access token. It will only last up to 60 days and from then you would need to re-extend.
If it were a page you could extend the user access token then grab the page access token which would never expire.
Read more at
http://developers.facebook.com/roadmap/offline-access-removal/

Facebook login with ASP.NET

I am implementing Facebook login on my website. I am creating an asp.net user as well with the Facebook users details. This way I can control login in people to my site using .NET membership regardless of whether they are a Facebook user or not.
The problem I am facing now is security. When a user logs in with Facebook I am calling a webservice with their facebook details, if the user exists on the system (by their facebook userid) then I log them in. However as it stands anyone could call the webservice with someone elses facebook id and it would log them in (if that user existed on the system). Is there something that I can use to link the facebook user with my asp.net user that is only accessible to that user, such as an access token. It also needs to be something which does not change? Does facebook send back such a thing in the response object?
Any help or suggestions are much appreciated.
Thanks
Yes, we can get that profile data from Facebook. Using that requestAccessToken Url you can get that access token.
requestAccessTokenurl="https://graph.facebook.com/oauth/access_token?client_id={0} redirect_uri={1};client_secret={2};code={3}"
Also we can get the Profile Data using this access token
requestProfileUrl="https://graph.facebook.com/me"
please see this link- http://easyoauth.codeplex.com/
you can download the source code also :)
We have implemented for Facebook, Twitter, LinkedIn, Google using this framework. It is very straight forward. I can help you how to do this.
Thanks

Facebook Graph API and friend's email

There are some question on the StackOverflow about facebook & email, but after reading them I still have a problem with retrieving users emails.
Our app implemented on Flex and uses REST API. And previously it used notifications.sendEmail.
App has publish_stream and email permissions (checked with users.hasAppPermission).
I tried users.getInfo for get proxied_email address.
But this function does not return email address of the friend..
Then I performed the following test using Graph API and web browser:
Opened the following link for authorization with extended permissions:
https://graph.facebook.com/oauth/authorize?client_id=[app_id]&scope=publish_stream,offline_access,email&redirect_uri=http://www.facebook.com/connect/login_success.html
It returned code for retrieving access_token
Oppened the following link for retrieving access_token
graph.facebook.com/oauth/access_token?client_id=[app_id]&client_secret=[secret]&code=[code]&redirect_uri=http://www.facebook.com/connect/login_success.html
It returned access_token. And now I can use GraphAPI.
Tested with my account
graph.facebook.com/me?access_token=[token]
Ok. It returned my emal.
Tested with my friend
graph.facebook.com/[friend_id]?access_token=[token]
And here is no email field!
So my questions are
Where did I go wrong?
Is it possible to get friend's email via Facebook API (GraphAPI or REST API)?
Thanks.
Email permission gives access to your email only.
If you look at the extended permissions page it says:
Likewise, to protect the privacy of users who have not explicitly authorized your application, your application will only be able to access the basic profile information about a user's friends, like their names and profile pictures. If your application needs to access other data about a user's friends to enable social functionality, you will need to request some of the special friends permissions listed below.
And if you look at the table below, it says "not available" for email permission for friends.
there ought to be some way else how does JanRain does it?
http://www.janrain.com/products/engage/invite-friends
I think that getting friends' email ids is not permitted by Facebook; at least, that's what my research tells me.
#helloworld: Who told you that janrain gets users' friends' email ids?
Only with the extended permission you can specify via the scope attribute, when obtaining the access token
Example:
https://graph.facebook.com/oauth/authorize?
client_id=...&
redirect_uri=http://www.example.com/callback&
scope=email

Resources