Add Friend through Facebook Dialog - Android Facebook SDK - android

I am currently developing an Android app using the Facebook API. One module of my application consists in adding a friend (knowing the ID) and I would like to add a friend through the FB Dialog object.
I used the Facebook object with dialog method:
http://developers.facebook.com/docs/reference/androidsdk/dialog/ .
as well as the FbDialog class to try adding a friend through a dialog:
http://developers.facebook.com/docs/reference/dialogs/friends/ .
However, as it is written in the documentation only feed and oauth are supported through this dialog. As a consequence, when I use this dialog trying to add a friend, either it redirects me to my browser and the AddFriend web dialog, or it successfully open a dialog but with a message saying that this is not supported.
My question is: is it possible to have this dialog working with the Add friend mechanism in spite of what the documentation says? Maybe one of you guys has found a trick to do so. Or maybe it is just not possible, and I have to stay with this method (that is opening the web browser), which I find not very user-friendly for my app.
Thanks in advance!

Related

Corona sdk and Facebook - new Feed dialog not returning PostId after sharing in Android

I'm using the Facebook v4 plugin with Corona sdk for my app.
To implement sharing, I use the feed dialog (I prefer it over the share dialog because it allows more flexibility, so please don't tell me to switch to the share dialog).
Up until the latest version of facebook, everything worked as expected (pretty much)
if a share was successful, I'd get a PostId in the callback (e.g. "fbconnect://success?PostID=123456789")
if a share was unsuccessful (for example, cancelled by the user), there won't be a PostId (e.g. "fbconnect://success?PostID=" or "fbconnect://success?PostID=(null)")
However, since the latest Facebook update for Android I sometimes get a new feed dialog. In this new dialog, after a successful share I get the callback: "fbconnect://success?PostID=".
As I mentioned, I get this new feed dialog only sometimes, so it looks like Facebook is testing it out.
This is definitely a bug on Facebook's end, since I must have a way to determine if the user shared or not.
Any helpful thoughts?

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: Is there a way to make facebook.dialog less ugly? - Screenshot attached

I'm very close to having what I need for my facebook dialog, the post is working successfully, which has taken me a fair amount of time as i've struggled with the facebook sdk.
When I open the dialog to post a message to the feed ( or when I call authorise in a dialog ), it shows as shown here:
http://minus.com/mg6utFaHf
I'm looking for something more like this:
Any ideas why mind is showing so... ugly?
It's very square, in a webview, with the X in the top left.
Thanks, any help is much appreciated.
The new Facebook SDK should allow you to use the built in Facebook app to do such things via intent.
In alternative you could use the Intent ACTION_SEND to achieve what you want.
The new SDK of theirs implements a way of authorizing called Single Sign-On which searches the device for the presence of the Facebook app and sends an Intent to that app which will authorize for you. If the Facebook app is not found then it will fall back to the dialog method.
You'll still be stuck with square iOS-y like design for in app sharing, invite friends, etc. The only way I can think of getting around this is to use FQL but how to do that is beyond my knowledge.
http://minus.com/mg6utFaHf is just the standard facebook Feed dialog ... see https://developers.facebook.com/docs/reference/dialogs/feed/ ... just change www. to m. as for example https://m.facebook.com/dialog/feed?app_id=123050457758183&link=https://developers.facebook.com/docs/reference/dialogs/&picture=http://fbrell.com/f8.jpg&name=Facebook%20Dialogs&caption=Reference%20Documentation&description=Using%20Dialogs%20to%20interact%20with%20users.&redirect_uri=http://www.example.com/response
Said that if you want it different you have to implement UI and post data by your own by Graph api

Facebook Login dialog for mobile Web using oAuth

The facebook technical documentation looks like an ape threw it's own excrement at a website - and that's how useful it is too...
So I have this web app (for android devices) and I need to authenticate using oAuth (since facebook's "kaleidoscope API policy" requires that their APIs are never the same if you look at them twice).
I need to show the login screen and I would like it to open in a dialog box rather than a whole new page, since multiple pages aren't supported on all android devices.
This is what I have so far:
HTML:
<fb:login-button></fb:login-button>
Javascript:
FB.init({appId : XXXXX,status : true, cookie : true,xfbml : true, oauth:true});
Right now I get the full size PC style login dialog, but I want the nice pretty touch/mobile dialog. Any ideas?
You can fix the issue by using a link that they recommend with a slight modification:
Their Link:
http://www.facebook.com/dialog/oauth?client_id=YOUR_APP_ID&redirect_uri=YOUR_URL&display=touch
Your Link
http://m.facebook.com/dialog/oauth?client_id=YOUR_APP_ID&redirect_uri=YOUR_URL&display=touch
Notice the change of www to m.
Have you checked out the Facebook SDK for android? It has full source code. It also use oAuth and show complete Facebook dialog. Here is link
https://github.com/facebook/facebook-android-sdk/

Sending message using facebook android sdk

I wish to develop an Android app where the user can send messages by clicking a button and the send dialog box should appear whereby the user can send personal message to his friends.
However, this is not well documented in the FB site.
The feed dialog is appearing without error and I can post to wall but when I replace "feed" with "send", it gives an error saying "An error ouccured with MyApp. Pls. try again later.
http://developers.facebook.com/docs/guides/mobile/#android
The last item in the android post is how to get post dialog method.
You can't send in general but there could be some workaround... But that couldn't be generalized in that way... Because you have to use an API for that and there is not currently any support for that what I suppose you can read but can't write... http://developers.facebook.com/blog/post/291 is the reference for details...
You can't send a message with the Dialog (source: http://developers.facebook.com/docs/reference/androidsdk/dialog/):
void dialog(Context context, String action, DialogListener listener)
action - The type of dialog to call. Currently supported methods are feed, apprequests and oauth.
So, "send" is not a supported method.

Categories

Resources