How do I retrieve Facebook account last login locations with ip? - facebook-php-sdk

In Facebook under security tab we can see from where our Facebook account was last logged in or from what location Facebook messenger was opened .
I want to build an app for Facebook using Facebook php api to pull the information for a user so he can see it on a map.
Any help would be greatly appreciated.

Related

WeChat admin can't login

I have built a chat bot for WeChat and connected it to a WeChat official page on https://admin.wechat.com
However, I can no longer login to the admin website. It gives invalid user/password, but I know they are correct. When I use the same user/password to check the account status it says the account is active.
Also if I try to reset the password it gives me the error "Server Busy", the same all week. It was working a few weeks ago.
I also tried login on https://mp.weixin.qq.com but I think you need a China account to connect to it?
Can anyone with an official WeChat account check if they can sign in?
This is a login page which works for me right now: https://mp.weixin.qq.com/debug/cgi-bin/sandbox?t=sandbox/login
It is for sandbox mode only, if you have official WeChat account, and wish to run your bot in production with full capabiities ensbled, you need to login differently.
You don't need a Chinese account to login to weixin sandbox.

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 a way for users of my website to invite their friends via LinkedIn

I'm using the Facebook and LinkedIn API to allow users of my website to link their social network account with their website account, and I want to give them an opportunity to invite their friends from social networks to my site.
On the Refer-A-Friend page, I want to include Invite via Facebook and LinkedIn buttons which will send a request to those friends from that service.
In Facebook API I can do that with fb:request-form FBML tag.
The only possibility, I saw in LinkedIn Invitation API - is to add website users to your linkedin network but not the opposite.
So, Is there a way for users of my website to invite their LinkedIn friends?
Yes, LinkedIn doesn't provide connection's email but still you invite them through API but the message will go into linkedIn site message box.
Try with linkedIn API how to import connection and send them message. As i have already worked on that way and it's working for me.
Linkedin doesn't provide connection's email address , therefor you cannot invite friend via linkedin . I guess you had already google a lot about it and found that term.
My statement is based on following reference .
https://developer.linkedin.com/forum/export-contacts-email-using-c-or-java
http://www.quora.com/Why-doesnt-the-LinkedIn-API-provide-email-addresses

Facebook/Twitter login in my application

I am developing my site and in my site I want users to login through their
social network credentials like Facebook and Twitter.
How should I track these users whenever they do any event on my site? Suppose a user logs in with Facebook username & password, and now he is redirected to the next page. On that page, we are doing some activity like 'add something'. How to track this?
Is there any procedure for working with this?
The common practice is to associate user's Facebook or Twitter account with your internal account and then track all user activity via your internal account id. If the newly logged in user doesn't have an internal account, then silently create it from Facebook/Twitter data and auto-associate.
Btw, integrating your ASP.Net app with Facebook and Twitter will be easier using Facebook C# SDK for Facebook and Twitterizer for Twitter.
Have a look a the OAuth C# Library
http://www.matlus.com/oauth-c-library/

Can the Facebook C# SDK support these typical site login/registration scenarios?

I want to support the following scenarios on my ASP.NET MVC website:
First time visitor wants to
register, via facebook connect. I'd
like the user to have an entry in my
user membership table - so I have
them enter a username/password
(email gets populated via facebook
connect).
Registered user returns to my
site, logged into facebook already.
I'd like my site to see they're
logged into facebook already and
auto log them into my membership
system.
Registered user returns to my
site, but is not logged into
facebook. I'd like to give them two
options: to log into my site
directly or use facebook connect.
Extra:
After a user has connected their
facebook account to my site, I'd
like to use their facebook profile
photo throughout my site where the
user has participated.
I'd also like to post a bit of text, maybe even a photo, to the user's wall (when they perform an action of course).
Couple questions:
What should I store to tie the user's id in my membership system to their facebook account? I'm assuming it would be their facebook user id.
Can this facebook C# SDK handle these scenarios?
Yes you would store their Facebook Id and Yes the API can support this.

Resources