Facebook Streampublish and user details - asp.net

We have a website wherein a user can post information from our website to their facebook wall. I am using Facebook graph api's streampublish to accomplish this task.
So, the flow works like this:
a. User clicks the 'Post this link to Facebook' button
b. if the user is not logged into facebook, a login popup box is automatically shown.
c. After successful login, the user is shown 'Post to Wall' popup box.
d. User posts message to the wall.
All of the above works fine. However my requirement is, after publishing the stream data I need to get the users email, firstname and lastname based on their facebook login and save it to our database. Does any one have any advice on how to get these information?
The website is built using Javascript, ASP.Net and C#
Edit:
Thanks for the response.
I am currently using the below syntax to post to a wall
FB.ui( { method: 'stream.publish',
message: userMessage1,
attachment: attachment1,
action_links: actionLinks1,
user_message_prompt: messagePrompt1,
target_id: targetId1,
actor_id: actorId1 },FBresponse);
Can I get the user object details via the FBresponse call back function? At the moment when I use Firebug, the response object contains only the post_id property

If you've got permission to publish on the user's wall, you should have a valid access token for that use. You can just query the Facebook Graph API /me object to get that information.

Related

Facebook user_link returned from Graph API, but leads to "Content Not Found" page

My app requests the user_link permission like this:
loginButton = findViewById(R.id.login_button);
loginButton.setPermissions("email", "user_link", "user_location");
And in the Graph API callback, the link field does contain a URL. However, for some users, selecting the link leads to the "Content Not Found" page. Why is this happening for some users but not all?
I just noticed that this only happens with test users! When Facebook tested my app, they used a name of a real user, but the email address was for a test user. Faked me out totally. I tested with an unfriended user and was able to see their page without a problem.

How do I get user's email from twitter authentication

We have an ASP.NET application where we need user's email in order to further send them transactional email. We have added Twitter Signup but not getting email address along with access_token.
We have checked twitter documentation and their FAQs for the same but have had no luck so far. The FAQ says that we need to ask for user's email in as a distinct act:
recently I came to a website http://medium.com which asks for email while authentication in it's scope, please refer to the image below:
I'm not sure how do I add email scope to my twitter application. Any help is highly appreciated!
It is not possible to get user's email address from twitter.
This can be made possible by filling out a form to request elevated permissions:
Go to https://support.twitter.com/forms/platform
Select "I need access to special permissions"
Enter Application Name and ID. These can be obtained via
https://apps.twitter.com/ -- the application ID is the numeric part
in the browser's address bar after you click your app.
Permissions Request: "Email address" Submit & wait for response

Google form is showing user who created the form as submitting request

I created a google form as a work request form for my team at work. The request then goes to a google group (where all team members can access and pull from) The issue is when a request from the form comes to the google group it is showing that it was submitted by me and not by who is requesting the work, but when we go to the google spreadsheet to see the request it is showing the correct user who submitted.
How can I get the user (work email) who submitted to show in the google group?
Response to first comment-
Here is what a work request looks like coming into our group inbox (google group)
This is showing as being sent by Shaun, but I (Jessica) as in the second picture shows was the requester who filled out this work request
It appears that Shaun is the owner of the spreadsheet receiving the input from the google form, and/or the author of the script that generates an email from the form input and sends it to the google group. You don't say so explicitly, but I would guess that you're using a "Collaborative inbox" group type.
Since the email to the group comes from Shaun, that is the user profile that is displayed on the message, above the message content.
Possible options that fail:
While you can specify a different "from" address when sending an email via the GMail Google Apps Script service, you are limited to using your own registered aliases - so that isn't going to help you.
Instead of emailing the completed form, have the script generate the whole group entry on behalf of the Requestor (sic). Despite a 7-year-old feature request, there is no API that supports this.
So what will work?
If you're willing to forego the form and spreadsheet, each requester can send their own email, which will ensure that their credentials are used to display a user profile on the groups page. To guide use of standardized fields, you can provide a mailto link with the body of the email pre-formatted for users.
mailto:work-group#googlegroups.com?subject=Work+Request&body=Request+Type:+%0dProgram:+%0dWork+Package+Name:+
Such a mailto link can be embedded on a web page, or kept as a browser shortcut to make it easy on users.

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

is there anyway to programatically get the data on a group's facebook wall through the API without having to popup a login screen

i have a group page. i am creating a website for the group and they want to be able to see the recent facebook updates (what you see on the group's facebook wall) on their website.
is this possible without having to have a facebook popup login and just programatically pass in my login information?
You cannot programatically fill in login information, that is against the Facebook terms and conditions. You can, however, authenticate as an application as opposed to a user.
Use the following method:
Make a GET request to:
https://graph.facebook.com/oauth/access_token?grant_type=client_credentials&client_id=CLIENT_ID&client_secret=CLIENT_SECRET
Facebook returns:
access_token=SOME_TOKEN
Use this token as your access token and it should allow you to access the group. I have tested this with my application and can confirm it works.
You request the wall information via the request:
https://graph.facebook.com/GROUP_ID/feed?access_token=SOME_TOKEN
This will not pop up any login screens as you are not required to be logged in to view a public group. Ensure your privacy settings are public for the group as well.

Resources