I have an Android application, and I implemented the sharing via Facebook SDK for Android, I use the "Channel Dialog"
Everything works as it is written, however, since the content is Audio, now I also want to share MP3 files, as SoundCloud does. Feed Dialog accepts a "source" parameter, which appears to accept a SWF or MP3 source URL. The documentation for the dialog box functions is presented here.
However, when I insert the Source parameter, it does exactly the same as it says about the gesture "If both the source and the image are specified, only the source is used." However, this does not correspond to the first promise, which is: "The URL of the media file (SWF or MP3) attached to this message."
My code is below:
private void publishFeedDialog() {
Bundle params = new Bundle();
params.putString("app_id", "xxxxxxxxxxxxxxx");
params.putString("name", "Name of Audio File");
params.putString("caption", "Listen to Audios");
params.putString("description", "Listen Listen Listen");
params.putString("link", "applink on store");
params.putString("picture", "picturehostedsomewhere.png");
params.putString("source", "http://www.looptvandfilm.com/blog/Radiohead%20-%20In%20Rainbows/01%20-%20Radiohead%20-%2015%20Step.MP3");
WebDialog feedDialog = (
new WebDialog.FeedDialogBuilder(this,
Session.getActiveSession(),
params))
.setOnCompleteListener(new OnCompleteListener() {
@Override
public void onComplete(Bundle values,
FacebookException error) {
if (error == null) {
final String postId = values.getString("post_id");
if (postId != null) {
Toast.makeText(getApplicationContext(),
"Shared on Facebook",
Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(getApplicationContext(),
"Publish cancelled",
Toast.LENGTH_SHORT).show();
}
} else if (error instanceof FacebookOperationCanceledException) {
Toast.makeText(getApplicationContext(),
"Publish cancelled",
Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(getApplicationContext(),
"Error posting story",
Toast.LENGTH_SHORT).show();
}
}
})
.build();
feedDialog.show();
}
What I see when I tell a story is a story without any picture, it’s just text with a link, name, title and description, no source, no image, I assume that either facebookdk has a problem extracting the source or Something is missing for me. I'm just wondering where I am behaving wrong? Any help please?