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.
Related
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
I created an app that gets the news feed from Facebook and displays it. I want to enable users to comment and like from within my app, but I couldn't find any API for that. I did find a custom URL scheme for Facebook: fb://post/{postId} which I'm trying to use. For each post, I get the post Id and create a link in a textview on Android pointing to that URL. I printed out the URL and this is an example: fb://post/47526370263_10152072729085264
likes is a TextView in my Facebook adapter with the text being the number of likes a post got. I want this view to contain a link to Facebook's app which will open that specific post.
String linkToPost = "fb://post/" + status.getId();
likes.setText(Html.fromHtml("" + status.getLikeCount() + " like"));
When I click on the link in my app nothing gets opened. How do I enable people to view/post comments/likes from within my Facebook News Feed app?
I saw a related answer after I posted this. The solution is to do:
likes.setMovementMethod(LinkMovementMethod.getInstance());
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
I have a Facebook canvas app that creates wall posts on a community Facebook page.
At the same time, the app 'shares' a link to the new post on the users wall.
In all the browsers, clicking on the shared link takes you to a FB page with the original post.
In the native iOS FB App, clicking on the shared link gets a 'The page you requested was not found' error.
The shared link is of the form: http://www.facebook.com/[ParentPageID] _ [PostID]
Facebook converts the link to the following form: http://www.facebook.com/permalink.php?story_fbid=[PostID]&id=[ParentPageID]
Any ideas?
that only happens if your HASH KEY generated from your application doesn't actually match the one you have entered on the Facebook App Developer Page
The complete answer:
To fix the problem I created a page within the app (PostingRedirectHandler.aspx) that serves as the focal point for all 'shared' links posted to user walls. Example:
https://fb.shoutoutforhope.org/PostingRedirectHandler.aspx?postID=370911822944882_152681898208096
This redirection works (so far) on all tested platform/browser combinations.
this is the code from the redirect:
string qString = Request.QueryString["postid"];
string[] fbPostData = qString.Split('_');
redirectLocation = "http://www.facebook.com/permalink.php?story_fbid=" + fbPostData[1].ToString() + "&id=" + fbPostData[0].ToString();
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