I'm trying to share some content's on facebook but i have a lot of problems. i've add the correct keyhash, and created the app on facebook and put it live. When i try to share something it seems good as you can see:
But after i've clicked on post it's empty:
It's a permission problem? i've read a lot about this on stack but i can't find an answer that works... That's the code :
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId())
{
case R.id.action_share:
Intent intent2=new Intent(Intent.ACTION_SEND);
intent2.setType("text/plain");
intent2.putExtra(Intent.EXTRA_TEXT,"'"+ random + "'" + "\n"+"By Random Quotes");
startActivity(Intent.createChooser(intent2, "Share via"));
break;
case R.id.randombut:
Frasi();
case android.R.id.home:
Intent homeIntent = new Intent(this, MainActivity.class);
homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(homeIntent);
break;
case R.id.facebook:
FacebookDialog shareDialog = new FacebookDialog.ShareDialogBuilder(this)
.setApplicationName("Random Quotes")
.setDescription(random)
.setPicture("https://lh6.ggpht.com/1UJ89ho9pvVLPYS6NsFVQdb7KoQPALMhkw1w7DnNDqcfDYJ-tRxruaf2YLMLyqhnG_g=w300-rw")
.setLink("https://play.google.com/store/apps/details?id=com.techappstudios.randomquotes")
.build();
uiHelper.trackPendingDialogCall(shareDialog.present());
}
return true;
}