Reputation: 11
When I share text on Facebook via Intent --> Facebook app it appears on FB with "Shared via Facebook for Android". Im wondering if I can change it to "Shared via AppName for Android". ? Have a great day everyone ! :)
Upvotes: 1
Views: 4712
Reputation: 45942
Of course you can...
Facebook facebook = new Facebook("your_add_id");
Add this code to publish
facebook.authorize(this, new String[] { "email", "read_stream" }, new DialogListener() {
public void onComplete(Bundle values) {}
public void onFacebookError(FacebookError error) {}
public void onError(DialogError e) {}
public void onCancel() {}
});
Bundle parameters = new Bundle();
parameters.putString("message", "Test Photo");
parameters.putString("attachment", "{\"name\":\"My Test Image\"," +"\"href\":\""+"http://www.google.com"+"\"," +"\"media\":[{\"type\":\"image\",\"src\":\""+"http://www.google.com/logos/mucha10-hp.jpg"+"\",\"href\":\""+"http://www.google.com"+"\"}]" +"}");
facebook.dialog(this, "stream.publish", parameters, null);
this is the code to publish a link or image I forgot .. anyway this is just an idea
Upvotes: 2