• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

how to send int variable value in attachment of FBConnect

Vishakha

Lurker
Hello,

I am using FBConnect for posting game score on facebook wall. In attachment I want to send game score that integer variable.If following is the attachment then in caption how can I send integer variable value.

private void publishFeed() {
Intent intent = new Intent(this, FBFeedActivity.class);
intent.putExtra("userMessagePrompt", "Example prompt");
intent.putExtra("attachment", "{\"name\":\"Facebook Connect for Android\",\"href\":\"http://code.google.com/p/fbconnect-android/\",\"caption\":\"I score playerScore points \",\"description\":\"Description\",\"media\":[{\"type\":\"image\",\"src\":\"http://img40.yfrog.com/img40/5914/iphoneconnectbtn.jpg\",\"href\":\"http://developers.facebook.com/connect.php?tab=iphone/\"}],\"properties\":{\"another link\":{\"text\":\"Facebook home page\",\"href\":\"http://www.facebook.com\"}}}");
this.startActivityForResult(intent, MESSAGEPUBLISHED);
}



In above code the "playerScore" is integer variable which value I want display on facebook wall.


Thank you.

regards,
Vishakha.
 
I wanna welcome you here! Thanks for joining! PM me if you need help finding your way around! :D
 
Back
Top Bottom