20632

FB Login : Don't know how to get response after a successful login

Question:

I have added an fblogin button to my website it is working fine a button is placed and when user clicks on it a dialogue box opens for login.

But i don't know how to get response after a successful login.

Please suggest

Answer1:

You can use the JS SDK to subscribe to events of that type. Take a look at the <a href="https://developers.facebook.com/docs/reference/javascript/FB.Event.subscribe/" rel="nofollow">facebook javascript documentation</a>, the method you are looking for is 'auth.authResponseChange' :

FB.Event.subscribe('auth.authResponseChange', function(response) { alert('The status of the session is: ' + response.status); });

Recommend

  • Dealing with the open/save/cancel dialogue window in IE when using VBA
  • Adding class in table in ckeditor for rails application
  • VBA userform toolbox additional controls dialogue window not showing
  • Displaying field specific validation error messages in jqGrid (server-side validation)
  • ActionBar three-dot dropdown opens at the wrong place
  • Access 2007 forms with parameterized RecordSource
  • Passing information to server-side function in a Google Docs Add On
  • Android custom URI scheme incorrectly encoded when type in browser
  • HTML5 video only works in IE. The other browsers shows the black screen
  • Redshift Querying: error xx000 disk full redshift
  • ASP.NET MVC Application won't update some controllers
  • Selenium to click on a javascript button corresponding to a text
  • Button click event not firing in jQuery
  • How do I superscript characters in a UIButton?
  • Ajax calls do not work in IE unless you fiddle with security settings
  • Keep this build forever option - Jenkins
  • onBackPressed() not being executed
  • Rails Find when some params will be blank
  • Django rest serializer Breaks when data exists
  • Android fill_parent issue
  • Highlight and Bold text in JTextPane
  • Recording logins for password protected directories
  • Is there any way to access browser form field suggestions from JavaScript?
  • Deselecting radio buttons while keeping the View Model in synch
  • req.body is undefined - nodejs
  • Modifying destination and filename of gulp-svg-sprite
  • How to show dropdown in excel using jrxml (jasper api)?
  • Importing jscolor library in angular 2
  • How to make Safari send if-modified-since header?
  • jquery mobile loadPage not working
  • How can I estimate amount of memory left with calling System.gc()?
  • Properly structure and highlight a GtkPopoverMenu using PyGObject
  • jqPlot EnhancedLegendRenderer plugin does not toggle series for Pie charts
  • Is there a mandatory requirement to switch app.yaml?
  • File upload with ng-file-upload throwing error
  • Windows forms listbox.selecteditem displaying “System.Data.DataRowView” instead of actual value
  • ExecuteAsync RestSharp to allow backgroundWorker CancellationPending c#
  • AngularJs get employee from factory
  • How can I get HTML syntax highlighting in my editor for CakePHP?
  • Getting error when using KSoap library to consume .NET web services