I want to know if a visitor to my website is logged into facebook or not? And what information will I be able to fetch from the user's fb profile, so that to login user on my website if user had already synced his fb account?
Is it possible to know if my visitor is logged into facebook?
775 Views Asked by Dreamer At
2
There are 2 best solutions below
1
joepio
On
Facebook's API has a function FB.getLoginStatus() that returns either a connected, not_authorized or unknown string depending on if the visitor has authorized your application, has logged in to facebook or neither.
If you want user data, like a picture or a name, you're gonna need to authenticate your application.
Related Questions in JAVASCRIPT
- Angular Show All When No Filter Is Supplied
- Why does a function show up as not defined
- I count the time the user takes to solve my quiz using Javascript but I want the same time displayed on another page
- Set "More" "Less" font size
- Using pagination on a table in AngularJS
- How to sort these using Javascript or Jquery Most effectively
- how to fill out the table with next values in array with one button
- State with different subviews
- Ajax jQuery firing multiple time display event for the same result
- Getting and passing MVC Model data to AngularJS controller
- Disable variable in eval
- javascript nested loops waiting for user input
- .hover() seems to overwrite .click()
- How to sort a multi-dimensional array by the second array in descending order?
- How do I find the fonts that are not loading in a CORS situation ( MoovWeb )?
Related Questions in FACEBOOK
- Facebook Api - Albums/Photos/Comments
- How to get Facebook subscriber count + friend count
- Firebase facebook authentication not working
- Facebook iOS SDK 4 error info.plist
- Why don't any of my facebook share buttons work?
- Can't perform authentication through facebook with Parse
- PlayN and Firefox issues
- How do I stop the facebook send widget from going off the screen?
- Add extended permissions - Facebook
- Pass image, summary, URL to Facebook share button in ASP.NET MVC
- Facebook Open Graph Description in a message length limitation
- Facebook ShareKit image caption not working
- how to display Notification Count in iOS like Facebook
- How to estimate current situation of an old site not created by myself before i launch my new one?
- Facebook Graph API limit publishing to fan page
Related Questions in API
- SuiteCRM how to retrieve all account related contacts
- how do i submit a pastebin or pastee from an android app and get the url back
- BigCommerce PHP API delete Category which contains products
- Interact with chrome bookmarks outside of extensions
- purchase individual items and subscriptions in the same PayPal REST API transaction
- youtube api v3 insert comments
- Youtube api v3 duration
- Responding to an Office 365 event invite via REST
- Convert youtube video to mp3 using Quick MP3 API
- How to real-time monitor the emails?
- Laravel - Fractal - Using Find() in transformer file- is it correct or can it be done more efficiently?
- return data from a Azure API json
- Accessing Picasa Web API using PHP
- RAML multivalued form parameter
- TestFlight API and stats with as3
Related Questions in STATUS
- Wordpress how to override function get_order_report_data from wc_admin_report
- workflow status on a third-party website
- How to continue ajax remaining requests if file not found?
- Is there any way to get more detailed error reports from a windows API call?
- HTTP Status 403 - Invalid CSRF Token 'null' was found on the request parameter '_csrf' or header 'X-CSRF-TOKEN'
- Unity3D Android - Overlap Status Bar
- controller action for changing status in yii2
- Android Translucent status bar differs in different devices
- Storing check status of toDo list
- unable to update Status of product from csv
- change column status in JIRA in existing board
- Changing status bar color on HUAWEI device not working (API level 22)
- How to check status of AVPlayer?
- Given a PPID, how to find all of associated PID?
- How can I see a list of my newly-created files in git without staging them for commit?
Related Questions in LOGINSTATUS
- How to change login status in LoginView control
- Alternative to ASP.NET LoginStatus Control in C#
- Is it possible to know if my visitor is logged into facebook?
- ASP.NET LoginStatus inside LoginView doesn't trigger LoggingOut event
- TypeError: theForm.submit is not a function with asp:LoginStatus
- Login control inside updatepanel
- LoginImageUrl not working
- How to check if users are in their Yahoo! / Gmail account
- asp.net membership LoginStatus control needs codes?
- "getLoginStatusUrl()" from the Facebook PHP sdk not working properly?
- How to show a popup box when user click Login on LoginStatus Control asp.net?
- How to center loginStatus login screen
- ASP C# - logoutaction redirect not working
- Login and LoginStatus destination URLs not working properly
- SQL server 2008 r2 Last database user date and time
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
You can only create an App and check if the User is authorized - without authorization, he is completely anonymous. What information you can fetch is explained in the API reference: https://developers.facebook.com/docs/graph-api
For example, you can check if the user is logged in with
FB.getLoginStatus: https://developers.facebook.com/docs/reference/javascript/FB.getLoginStatusMore information: