Thursday, September 13, 2012

Facebook "Like" Button for iOS , Android and Blackberry



Before using this below code, please add facebook library to your project and use token of facebook Api to like facebook page.

public String likeFacebookButton( String urlWantToLike ) {

String url = null;

if(facebook.isSessionValid())
{
url = "http://www.facebook.com/plugins/like.php?" +
"href=" + URLEncoder.encode( urlWantToLike ) + "&" +
"send=false&"+
"layout=button_count&" +
"show_faces=false&" +
"width=100&" +
"height=21&"+
"action=like&" +
"font=arial&"+
"colorscheme=light&" +
"access_token=" + URLEncoder.encode( facebook.getAccessToken() );

}
return url;
}

Eclipse: "Run As","Debug As","Profile As" doesn't display the elements of list

Above problem have just wasted my whole day so i gone through all eclipse docs and community forums and finally i got the solution.

The solution to above problem is to execute this command in terminal

"sudo apt-get --reinstall install tzdata-java"