Posts

Showing posts with the label facebook

facebook Send Button pick up default image from site how to change this image according to our us?

Image
when you use Facebook's Send button its shows which images and how to change this image       1st thing you have to do is: follow this link   http://developers.facebook.com/tools/debug enter the url and check the Object Properties and see the title image and description , image of facebook page . now go to header of your website and and set top of the page title , description , keywords , image for image you can paste this code and change the path of website <meta name="image" content="http://www.earlyshares.com/public/images/earlyshares-petition.png" src="http://www.earlyshares.com/public/images/earlyshares-petition.png"/> change the image name according to website which one you want to show in below the facebook send button   please clear the cache and cookie before to test this.   and confirm that meta image code should be top from the send button

response.session.access_token is not working during the facebook connect?

JavaScript SDK and OAuth 2.0 Roadmap Facebook has updated JavaScript SDK and OAuth 2.0 Roadmap Due to this reason response.session.access_token is not working So You have make some changes in your Facebook login Function   FB.login(function(response) {                 if(response.session) {                     var access_token = response.session.access_token;                     FB.api('/me', function(response) {                     }                 } }   Your code was like this in facebook login function.   So edit some code and make this problem solved    FB.login(function(response) {                     if (response.authResponse) {                     var accessToken = response.authResponse.accessToken;                     alert(accessToken);                     FB.api('/me', function(response) {                     }                 } } So you have to change response.session to response.authResponse and  access_token to accessToken Done

How to print a response object comes by facebook login in javascript or jquery?

Facebook response return an object So for print the response You can use JSON . stringify () function. You can use this function as mention below alert( JSON . stringify (response)); Example : FB.login(function( response ) {                     FB.api('/me', function( response ) {                   var query = FB.Data.query('select src_big from photo where pid in (select cover_pid from album where owner={0} and name="Profile Pictures")', response.id);                  query.wait(function(rows) {                          alert(JSON.stringify(response));                                });                    }); }