I have my appId for facebook. Which type of configuration and auth should I require.
Now I want to post a String message on Facebook wall when some condition true. What should I do?
I am just giving you the first link i found on the search , take a look it, it has all the things you require...
http://blog.doityourselfandroid.com/2011/02/28/30-minute-guide-integrating-facebook-android-application/
Please go through below link . It might helps you a lot.
Facebook android sdk
you can also send message directly using the below code.
Bundle params = new Bundle();
params.putString("message", message);
mFacebook.request("me/feed", params, "POST");
you can create facebook object and using request method you can directly post to user wall. Before posting on wall you must have to login into facebook .
Checkout Facebook SDK for android
https://github.com/facebook/facebook-android-sdk
also Facebook Android Tutorial It will help you.
https://developers.facebook.com/docs/mobile/android/build/
Related
I need to search facebook user by using his name or mail-id just like how it works in facebook search box. Any API's available for that.
Thanks in advance.
You will get a bunch of options for searching at this link here: https://developers.facebook.com/docs/reference/api/. On this page, you will need to scroll down a bit till you find the Searching heading.
I am personally, not aware of any provision to search using the email address.
I think you should take a look to the facebook developer documents talking about android and and the example provide in the SDK first
https://developers.facebook.com/docs/mobile/android/build/
It will help you to recognize how to use the facebook-android-sdk
Here's are the code
Bundle params = new Bundle();
params.putString("q", "Your Name");
params.putString("type", "user");//fix
String resp = fb.request("search", params, "GET");//call the request function of android sdk 2.X, ensure you have well setup the library and logged
I registered an Android app with Facebook but I'm having a hard time posting on the user's wall and on the user's friends wall. For example, when I post to my own wall from the app, I'm the only one who can see the post. And when I post on any of my friend's wall, I get no errors but the post doesn't appear in his wall. The app asks for the permission "publish_stream" so in the beginning, I should be able to do it. I've thoroughly been searching on the Facebook documentation and on the web but I haven't found any solution to the problem. That's the code I execute to post:
//me
facebook.dialog(Activity, "feed", new PostDialogListener());
//friend of mine
Bundle params = new Bundle();
params.putString("to", "id_friend");
facebook.dialog(Activity, "feed", params new PostDialogListener());
Any comments would be highly appreciated.
Thanks in advance!
I found it. The problem was that sandbox was enabled in the app settings. Once I disabled it, I could post perfectly on my friends wall and on my own too.
I can able to login, but facing difficulty in posting message on facebook wall. can somebody give me the possible resolutions?
check out the link below:
http://www.android10.org/index.php/articleslibraries/290-facebook-integration-in-your-android-application
Just, don't forget to add app ID in your code. And its the efficient code you can get...:)
I have a lot of apps published using the FB android sdk
github.com/facebook/facebook-android-sdk
All my applications that use FB stopped working since few days.
This is necessarily a change or a bug from FB side, because nothing has changed in my applications, It worked for months.
The dialog that opens to post a message ("stream.publish") seems not use the param "message", the form opens but the text box is empty!
Bundle parameters = new Bundle();
parameters.putString("message", "test message");
mFacebook.dialog(Example.this, "stream.publish", parameters,new SampleDialogListener());
Using debug I saw the URL with the "message" param:
https://m.facebook.com/dialog/stream.publish?message=test+message&app_id=....
The text input in the webview is emtpy!
Somebody have an idea or a workaround to fix this issue?
Try "feed" instead of "stream.publish"
Had the same problem for the last few days. Looks like Facebook is deprecating the Stream API: http://developers.facebook.com/docs/reference/rest/stream.publish/, not sure if this has anything to do with that.
Anyway, switching to using the Graph API's 'feed' method worked for me.
I am working on an application where I need to integrate the Like functionality of Facebook, other than Like I have completed all the features including Share, Upload, etc..
I am stuck in Like because I did,'t find anything for Like in the Facebook SDK I found from the Net on demand.
Can anybody please help me in this, any help or link will be greatly appreciated.
Thanks,
david
From what I understand, you are correct in that there is no Like functionality in the SDK.
It seems that the best way is to use a WebView with the standard Javascript code available from Facebook, however I think this way has it's own problems but looks like it can be accomplished...
See here and here.
If you have OBJECT_ID for the item you want to like, it shouldn't require anything else than sending an empty HTTP POST to http://graph.facebook.com/OBJECT_ID/likes .
Bundle params = new Bundle();
params.putString(Facebook.TOKEN, mFacebook.getAccessToken());
mFacebook.request(objectId + "/likes", params, "POST");
See Publishing in developer docs.