westman Posted August 6, 2012 Share Posted August 6, 2012 hi all i put a facebook login on my site and its not working this is what i have... <div id="fb-root"></div> <script> window.fbAsyncInit = function() { FB.init({ appId : 'YOUR_APP_ID', // App ID channelUrl : '//WWW.MY_DOMAIN.COM/channel.html', // Channel File status : true, // check login status cookie : true, // enable cookies to allow the server to access the session xfbml : true // parse XFBML }); }; // Load the SDK Asynchronously (function(d){ var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0]; if (d.getElementById(id)) {return;} js = d.createElement('script'); js.id = id; js.async = true; js.src = "//connect.facebook.net/en_US/all.js"; ref.parentNode.insertBefore(js, ref); }(document)); </script><div class="fb-login-button" scope="email" data-show-faces="false" data-width="200" data-max-rows="1"></div> i put my appId in place and with channelUrl i put in the site page after login (user home page) is that right? plus how can i get facebook users info into php veribles? Link to comment Share on other sites More sharing options...
justsomeguy Posted August 7, 2012 Share Posted August 7, 2012 Check your error console, and use the developer tools to check requests to look for the request for the API. It doesn't look like you have the correct source. plus how can i get facebook users info into php veribles?Use their PHP SDK. Also, not that this matters since I've already told you before, but "verible" is not a word. Link to comment Share on other sites More sharing options...
divinedesigns1 Posted August 11, 2012 Share Posted August 11, 2012 variable not veriable, your mixing up the "a" with your "e" so when your typing it, just remember its not an "e" but an "a" Link to comment Share on other sites More sharing options...
westman Posted August 30, 2012 Author Share Posted August 30, 2012 ok thak you for finding my spelling error "variable"but back to the script...i still cant get it working could any one give a code example? Link to comment Share on other sites More sharing options...
thescientist Posted August 30, 2012 Share Posted August 30, 2012 as suggested, use their PHP SDK. If you want to use their JS SDK/implementation, then you would need to read their documentation and get the values you need and make an AJAX request to a PHP script with those values. fwiw, I found it easier to read their API documentation and made my own custom class making curl requests to their API to get the information I needed. Of course, for my specific case, I'm relying on offline access (which will be deprecated soon) in order to show FB information for the user/owner of the site, so it's kind of specific to my own unique requirements. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now