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.
Related
I'm trying to implement "ask life", "send life" features in my game. Now I'm stuck with facebook-unity sdk. I was able to send simple requests with FB.AppRequest, but can't figure how to send requests with OGActionType.SEND and OGActionType.ASKFOR types. As I figured out, I need to send objectId of the object that i want send to another player. But, I can't figure out how to add it. Object browser in facebook developer dashboard doesn't contains button for adding new object
I found another question, where mentioned that 2.8 FB api doesn't support creation of new objects: Add new object with facebook developer api v2.8
So, I have 2 main questions currently:
Is it possible to implement "send life" feature with facebook-unity api ?
If yes, can I do something to add facebook OG object or there is another way to do it?
Yes, it is possible to do what you want, and I believe OG objects are the way to do it. I wrote a tutorial a while back on how to achieve just this, since it took me a while too to figure it out.
Hope it helps you!
http://www.bigfootgaming.net/blog/tutorials/facebook-open-graph-objects-in-unity3d/
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 am using the facebook API in my app, i know how to post message on wall. my requirement is, i want read the wall information of user recent status information through code .
How can i achieve this...
for example. from my facebook account i want to get the latest status information.
Here's a great example of using the GraphAPI to do that
https://graph.facebook.com/me/feed?access_token={}
Try it out here: https://developers.facebook.com/tools/explorer
EDIT
I stumbled across this the other day. There's a connection from the user object called statuses, which filters the stream even more than feed. As with many graph calls, you can add ?limit=N to limit the result set. So this new way I discovered would look like:
https://graph.facebook.com/me/statuses?limit=1&access_token={}
You should use a third party API such as Easy Facebook SDK. It allows you to do what you are trying to do with ease.
U should check it out here:
http://developers.facebook.com/blog/post/385/
I'm a beginner of android and reading a book on android and found that code snippet there
twitter = new Twitter("student", "password");
twitter.setAPIRootUrl("http://yamba.marakana.com/api");
All the post I tweet goes to the site yamba.marakana.com but I don't want to see my twits in that marakana site, I want to post those directly to my twitter account(changing the "student" and "password" field ).
How can I do that? Is it a problem of APIRoouUrl? If yes then let me have the correct URL for the setAPIRootUrl() method.
By the way, I'm using jTwitter API from twitter in Android. Thanks in advance for the repliers :)
I followed the video series of the book on Youtube. He mentioned that if you want to post to the actual Twitter site, you have to submit some sort of form to Twitter as a developer for them to give you the proper information. Also, Twitter's API is probably a bit different from that of jTwitter, so it's probably not a good idea when you're just starting to learn.
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.