Android Facebook SDK 4.0 ShareDialog doesn't show long texts - android

I am a newbie developer on Android and Facebook SDK. I want to share my long description text content to facebook via Facebook SDK 4.0 on Android.
I have a ShareActionProvider on my App and it's working fine with my ShareDialog method. But I have a long description in my app and I want to share this description on Facebook. I imported and configured Facebook Android SDK and It's working fine with this method;
if (ShareDialog.canShow(ShareLinkContent.class)) {
Spanned faceKonu= Html.fromHtml(mShareKonu);
ShareLinkContent linkContent = new ShareLinkContent.Builder()
.setContentTitle(konu)
.setContentDescription(faceKonu.toString())
.setContentUrl(Uri.parse(getString(R.string.share_onfacebook_url)))
.setImageUrl(Uri.parse(getString(R.string.share_onfacebook_image_url)))
.build();
shareDialog.show(linkContent);
}
But this method shows my description text too short on wall or somewhere in facebook.
This is my description screen : http://i.imgur.com/56c2vIw.png
This is the facebook api when I tap the share on facebook on ShareActionProvider menu : http://i.imgur.com/LpvH9FT.png
How can I post all texts on Facebook like that ?
Thank you !

I have same problem with Android Facebook SDK 4.0. But I found this problem. I use my phone in Turkish. But When I change my phone language to English, problem is solved. That's like a joke. I think it's a bug for now. I hope they might solve this problem.

There is no way for you to influence the length of the preview Facebook shows for the link you shared. Keep the description brief, for everything else people can click on the link the user shared and read your full message.
As noted by Ming Li in the comments, don't publish this text via any other method as all content in the message field has to be user-generated and typed by the user character by character.

Predefined text which is not allowed by facebook is supposed to be everything but the text which is typed character by character. This possibly means that we should use open graph stories instead

Related

Facebook ShareDialog - Name and Description not shown when posted from Android APP

I am trying to integrate the Facebook with my Android App. I am using ShareDialog for sharing a short message using the below statements. The variable "message" the short information on game statistics. When I tried to share this particular message I am getting only the image and the Facebook app name. So finally I could see the image with the link and the Facebook app name but not with the values from (.setName / .setDescription). What I am supposed to do to get those details as well.
return new FacebookDialog.ShareDialogBuilder(this)
.setPicture("http://i61.tinypic.com/jjbslv.png")
.setName("Memory Game" + message)
.setDescription(message)
.setLink("https://play.google.com/store/apps/details?id=kids.animals.fruits.objects.brain.puzzle.memory.game.free")
;
Answer Source:
Android Facebook SDK FacebookDialog.shareDialogBuilder doesn't show my description
Replacing playstore's like with website's link solved it for me too.

Facebook login problems current goals screen not generating oath token

I am a newbie and devleoping an app which uses facebook login and the details which we get after logging from facebook for further interactions. Two days back it was running fine but today it stopped running its just showing CURRENT GOALS screen and no button to do ok or cancel or anything of that sort. Just see this link
https://m.facebook.com/dialog/oauth?redirect_uri=fbconnect%3A%2F%2Fsuccess&display=touch&type=user_agent&client_id=307234779396415&ret=login&ext=1368864103&hash=AeZ9mMBQfC22WXj_&refid=9&_rdr
I am using the Facebook Dialog class to achieve the login but in the facebook sdk also the graphSampleApi sample project is running with same problem.
Please help I need to the login badly and my project deadline is today. Please help.
Thanks in advance.
try this simplier URL for log in ::
https://www.facebook.com/dialog/oauth?client_id=307234779396415&redirect_uri=https://www.facebook.com/connect/login_success.html&display=touch&scope=publish_stream
See my answer on this similar/duplicate question: FbDialog doesn't show full content on smaller devices
Basically, it looks like Facebook changed the code in these web dialogs and something in their javascript is not executing properly on some Android devices. The Cancel/OK buttons are there in the page content, but hidden, and the javascript is failing before the buttons are shown.
You can inject JavaScript to hide the "Current Goals" until FaceBook fixes their API.
See my answer here for details:
webDialog "CURRENT GOALS" header but no button to authorize or cancel

Post pic on wall with message with Android Facebook SDK 3.0

How can i post message along with Picture using Facebook SDK 3.0 on Android,
The link -> can post small pic with link and all other information.
http://developers.facebook.com/docs/howtos/androidsdk/3.0/feed-dialog/
What i want, is only to post Pic on wall with message, not a link with description ?
I want grab screen shot of my current Android screen that i did and saved it into SD card, i need to post it with message on custom button click.
How can i do this with Facebook SDK 3.0 for android ?
You can use the Graph API to post photos to a user's wall.
See the reference page for more details.
In the Facebook SDK, you would use the Request class to make Graph API calls.
You can use the newUploadPhotoRequest method to add a photo.
If you want to add a description as well, try setting the "message" parameter:
Request photoRequest = Request.newUploadPhotoRequest(...);
Bundle params = photoRequest.getParameters();
params.putString("message", "description goes here");
photoRequest.executeAsync();
Facebook changed this implementation for there version 2 Graph API requests, they recommend a Custom Story instead of posting (if you have your own content to put on the wall of the facebook user beside his comment, or even without his comment)
documentation goes here :
https://developers.facebook.com/docs/android/open-graph?locale=en_GB
just an error in the documentation, the facebook Open Graph objects are refered to by a colon, and not a dot, for example
they mention an open graph Object named "book" in a work space named "books" that way
"books.book"
the correct way is
"books:book"
and after you finish implementation you will need to review your application to facebook, which it's documentation goes here as well
https://developers.facebook.com/docs/apps/review?locale=en_GB
i really hate facebook documentation, it sucks

facebook private message using url

i'm doing simple android project using phonegap. I have to send private message to my friends in facebook from my application. Is there any way to send message through Url?
Until recently Facebook didn't support the send dialogue on mobile, so you couldn't do that.
With their push of Facebook messenger, they started supporting private messages on mobile - https://developers.facebook.com/docs/ios/share#message-dialog
Not idea if there's a PhoneGap plugin that supports it, I'm looking for one as well...
Check Direct URL Example section in send dialog page
https://www.facebook.com/dialog/send?app_id=123050457758183&
name=People%20Argue%20Just%20to%20Win&
link=http://www.nytimes.com/2011/06/15/arts/people-argue-just-to-win-scholars-assert.html&
redirect_uri=http://www.example.com/response
This is a sample link given in documentation.
On m.facebook.com, no display is needed, nor is any other display than 'touch' allowed as we always default to 'touch'.
So that doesn't seem to solve the problem.
Facebook says it's a bug by design https://developers.facebook.com/bugs/507406422635550?browse=search_511bd57f912f84e18364257

Android post wall facebook dialog missing small icon

I have a wierd problem with integrating a basic "post to facebook feed" in my app.
The first time after you install the app and use the post to wall button everything works great.
But after that first run the small icon next to the " via APPNAME" is missing when i use the "post to wall" button, there is just a missing picture questionmark there instead.
Here is the facebook code(tried to keep it simple as i dont require any other facebook functionality in my app):
if (facebook == null)
facebook = new Facebook("<MY_APP_ID>");
//Creating the bumdle parameters with link, picture, name, caption and description
facebook.dialog(this, "feed", parameters, new DialogListener(){});
I have run into this in the EMU, but actually on facebook the APP ICON actually shows up fine.
I am testing to see if this is a device issue or an EMU issue, but you can rest assured that it posts to FB properly.

Categories

Resources