By Using Facebook Graph API, How to read Facebook wall? - android

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/

Related

Facebook open graph in Corona SDK

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")

How to get a friends user wall from facebook?

I want to read my friends posts (feeds?, all posts but for a specific user only) from his user wall.
I need all (posts, feeds, statuses) that i see when i look at his page directly from the website.
I use the android sdk and i tried the graph api and rest method.
My app is registered and i have logged in facebook to get the access token (permission: read_stream)
but i dont get that infos that want to.
Please help.
Thx.
How about testing your Graph API call in the Graph API Explorer?
https://developers.facebook.com/tools/explorer/
In my case, I could get my first 10 friends' feed (wall) with the url https://graph.facebook.com/me?fields=friends.limit(10).fields(feed)
Note that I used field expansion of the Graph API.
http://developers.facebook.com/docs/reference/api/field_expansion/
You need them to actually use your app and grant full permissions via the graph API.
You cannot simply 'grab a friends wall'. You must do that via your app and it needs the permissions to do so from the user in question.

how do i like a message/notification with the linkedin api?

I have an application that authenticates users through the LinkedIn API. My questions:
is it possible for an application to like messages to all users who authorized it?
is it possible to get like list of a message to a subset of the application users?
I've been looking for a while, and can't find anything.
Via the Groups API of the LinkedIn APIs, you can like a post in a particular group using the following JavaScript code (XXXX is the particular post id):
IN.API.Raw('/posts/XXXX/relation-to-viewer/is-liked')
.method('PUT')
.body("true")
.result(function(result) {
alert(JSON.stringify(result));
})
.error(function(result) {
alert(JSON.stringify(result));
});
However, keep in mind that likes should not be automated but user initiated - only users who have authenticated your app should be liking posts, and only when they manually choose to do so. Writing a script that automatically likes all posts from any user that posts a message from your app is against the LinkedIn API terms of service.
Can't confirm for sure but maybe this link about likes can help u and give a clues about possible options.. Reported example you can find here or here. However I have no guaranty that this works cause I am not author of those posts.. Maybe u will find better and more accurate answer at LinkedIn API forum..
Hope it helped a bit.. Cheers

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 news feed reader on android

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.

Categories

Resources