How to find facebook account with emailid by using api - facebook

I am developing an application, in my application there is a requirement , to find the users profile based on EmailID in facebook and twitter using api's.
I have tried a lot but did not found any results
but when i using third party licensed api's they were getting the data from various social networking sites using emailid as input
Can any one please suggest me how to solve this

Facebook has removed the ability to search by email this year. It is covered in this stack overflow thread.
Even using FQL, it is neccessary for your app to have been approved by a user before it is able to access a user email. In the case where they have opted in all that is required is
SELECT email FROM user WHERE uid=FRIEND_ID
in the facebook FQL console.
Twitter has a similar rule for their API, and trying to search for user#email.com will end up looking for a user #email.com.
You will need to find other methods to search for users; searching by email tends to only be open in the app that the API creators made, and not for general public use.

Related

facebook application for login and messenger same ids?

I am building a facebook messenger bot. And the bot is giving user ids. But it is not clear to me if the messenger ids are the same ids that would be returned if I use the same app and add to it a login feature. Because we already have an app and has a login feature, now we need to build a facebook bot and identify the already existing users in our db that are using the bot.
I have read facebook tutorial about linking 2 different applications to the same business to get consistent ids. But what if I use that same application to login users AND for messengers (by using the add products to the application, and so having one application, one app id) would that work? Would I be getting the same user ids?
PS: I would test myself but I am in an awkward position where the page/database/login app owner is a different person, and they are not big on sharing data, and I am supposed to blindly write a messenger code that is supposed to work when they deploy it.
All help is appreciated, thank you.
You need to use Facebook's ID Matching APIs for this purpose:
Here is the details: https://developers.facebook.com/docs/messenger-platform/identity/id-matching

Facebook Messenger Platform: how to get user specific information?

I'm trying the recent released Facebook Messenger Platform and so far so good. Everything worked well and I was able to create a echo bot.
But I'm wondering how I could identify this user that started chatting in my page. For example, when a user started chatting I get a PID user (page specific user id).
Making the follow request to Facebook Graph API:
GET https://graph.facebook.com/v2.6/{PAGE_SPECIFIC_USER_ID}
I discovered that I can just ask for the following fields: first_name,last_name and profile_pic.
So my question is, how could I discover if this user is a current customer of my business page? Is there another way of querying more information (like e-mail and real facebook user id)?
Facebook has updated the messenger platform API (2016-07-01) and introduced a new feature called Account Linking. This can be used to identify a user who has created an account on your website via Facebook Login and you can link the two accounts. Facebook login has its own set of permissions which can be used to get a lot more information via Facebook graph API. You can find the complete list here.
Currently, there's no way to do this. The best way would be to prompt the user to enter their information in chat or give them a link to a mobile login page or some other way of linking their account to the chat.
Messenger Platform 2.0 introduce "ID Matching API" ,that will solve the problem.
https://developers.facebook.com/docs/messenger-platform/connecting-accounts
you can retreive a user information like below using fbmq library https://github.com/conbus/fbmq
# this method will occur when a message received from user
#page.handle_message
def message_handler(event):
user_profile = page.get_user_profile(event.sender_id)
print(user_profile) #first_name, last_name, profile_pic, gender ...

Is there API to get someone's facebook profile with out login to facebook?

I was wondering if its possible to get one's facebook profile (to be exact,'profile url') through their API?
I need an api to get fb profile link using a matching email address. I dont want to login to facebook though.I was trying to search for this but it seems you need to log in to facebook to get that.
Any idea or is it feasible?
You need ID of the concerned user which can't be achieved without using the Facebook Login, since Facebook login is the starting point to get the current user info (/me).
Search API could have helped you since you have the email ids of users, but unfortunately this api doesn't support user search with email!
So, answer is simple- NO, you cannot get the ID (profile link) of the user without using the facebook login.
Not that I can think of. Facebook's Graph API gives you some public info but that info given depends on the users Facebook's settings on what is public or not. You could maybe get some users profile picture but not others, making it not a very viable option for practical use. Hope that helps

Facebook login in classic ASP website

I have a Classic ASP message board (http://yankeedesi.com) where users are required to sign up for posting messages. I want to incorporate an additional functionality to login via facebook. I searched on Google but could not find any good examples for implementing this in Classic ASP. Can anyone direct me to a good source of how to do this?
I don't need any advanced functionality, just the basic login feature. My My user registration currently captures the First Name, Last Name, Email address, Country State and City. Is it possible to pull these information from the facebook profile once the user signs in through facebook and create their login in my database?
I guess this should be possible if you manually implement a so-called "Login Flow". Have a look at the docs at
https://developers.facebook.com/docs/facebook-login/manually-build-a-login-flow/v2.0
There you can find a step-by-step guide on how to implement OAuth with Facebook.

Integrating Facebook into Google analytics

I want to add the 'Log in with Facebook' option to my website, however I'm unsure how to integrate the information gained when someone logs into my website with Facebook with my current Google Analytics.
Is it possible to link up a visit in Google Analytics with a user who has logged into the site with Facebook to enable me to see things like age, gender etc?
Any help you can give me on this would be much appreciated.
Thanks,
Ben
you may have to do this via a redirection or possibly a frame.
Google Analytics does nolt track individual users, it provides anonymized data. So at the top level, no you cannot do this. However, there are a few more things avaiable to you. One: Facebook provides facebook insights, their own tracking suite, that will give you demographic information on the users of a facebook app or fan page. You site will effectively become a facebook app when you use their user authenication, so you will be able to get insights tracking on you site. At the present moment, facebook insights and google analyitcs do not itegrate or share data. Facebook insight also provides anonymized data, so you will not be able to identify an individual through the tracking.
The final option is, now that you are tracking users through login, you can implement your own tracking info on your site to see what individual users are doing, and attempt to track their preferences.
Its also entirely legal (in the United States at least) to buy access to marketing data and use use your registered user name pool to get additional information.
If you wanted, you could set up a "funnel" in Google.
When a user logs in through Facebook, you could send them to a specific page and then track their progress from there...
http://www.google.com/support/analytics/bin/answer.py?answer=55515
So using this you could get the percentage of users who log in through Facebook... etc.
But to collect information other than that, you would have to get the correct permissions documented here eg. user_birthday (to get the user's Birthday) and query the Graph API from there, thus implementing your own tracking of users.
You can query the Graph API using the various SDKs that Facebook provide explained here.
First of all you should check out this Google document. It explains, how you set a custom unique user id via google analytics.
Further you've to send an event to google analytics (e.g. 'fb_login') via the callback function of your facebook login function.