I am trying for a facebook integration on my android application.
My requirement is to read each news feed as and when it comes, and to display it using a toast.
All the sample application I see on net are based on the web GUI.
Can anyone help me with a sample code or hint to read the updates into a variable/string in my application?
Regards,
Dhanesh
using this after login in facebook dialog..
Facebook fb = new Facebook(APP_ID);
String newsfeed=fb.request("me/home");
System.out.println(newsfeed);
for get user news feed....
I'm guessing it's easiest done using Facebook Android SDK (you need permission for your application to access someone's news feed);
http://developers.facebook.com/docs/guides/mobile/#android
And Graph API documentation is a good read too;
http://developers.facebook.com/docs/reference/api/
Maybe there's some better examples but I found those documents rather complete while I was dealing with Facebook accessing.
Check out the Facebook API at http://developers.facebook.com/
Have you looked at facebook's owns api. Mobile Apps. If they don't have a solution on getting new news, then theres probably no clean api to get news an you have to turn to a scrape api or write your own scrape functions.
Related
I want to implement activity feed like that in Candy Crush in my app which is based on Corona and I am not able to find any good solution of that. If someone have any idea about this please help me out.
P.S. Any advise of open graph Facebook is invited.
I'm not using Corona SDk, but what I found is the following:
You could use the facebook.request() function (http://docs.coronalabs.com/api/library/facebook/request.html) to make a request to the Facebook Graph API.
Assuming that you already gathered the relevant permission ("publish_actions") from the user for your app, you could make use of the Scores API (https://developers.facebook.com/docs/score/) and the Achievements API (https://developers.facebook.com/docs/games/achievements/) to post to the Users timeline like described here:
https://developers.facebook.com/blog/post/539/
You can post a score like this:
facebook.request("https://graph.facebook.com/me/scores?score=USER_SCORE&access_token=APP_ACCESS_TOKEN", "POST")
where USER_SCORE is the actual score and APP_ACCESS_TOKEN is the App Access Token for you app.
For achievements, you have to create an achievement first, as described in the above links. Once this is done, you can can post an achievement like this:
facebook.request("https://graph.facebook.com/me/achievements?achievement=YOUR_ACHIEVEMENT_URL&access_token=APP_ACCESS_TOKEN", "POST")
i looking to get an android code for login in to soundcloud.com.I get an application from "https://github.com/soundcloud/android-intent-sharing". it is not ask to login when the user try to share sound with out login..? ,
can you suggest me any helping tutorial.
you are probably looking for this, Android is using Java.
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.
There is
com.sugree.twitter, java me api
I have used Twitter4j
Click on the following link to get source code
http://automateddeveloper.blogspot.com/2011/06/android-twitter-oauth-authentication.html
You should go for Twitter4j OAuth
OAuth is an open protocol which allows
the users to share their private
information and assets like photos,
videos etc. with another site without
sharing their credentials (username
and password) to the latter. Hence
making it very secure way of
transmission of data..
here is link for this...
http://www.xoriant.com/blog/mobile-application-development/twitter4j-oauth-on-android.html