Facebook Activity Feed in Mobile Game (iOS and Android) - android

I'm wondering how to feed an Game Activity on facebook from my mobile application(android game).
I know hot to make a post in the wall in facebook but I want directly to post in GameActivity not on the wall.
For example here (Game Activity Facebook) are apps wich one do that.
Have anyone tried to integrate your mobile application with this activity ?
Okey, I have found Graph API and now I'm wondering if i cand feed from graph not from dialog.
for example i got editor
Graph API Explorer
BUT... I have no idea how to use it ;/
The problem is in that, how to feed (post) from application to facebook so that the entry is visible in 'Game Feed' on Facebook
I'm using comend:
100000291400297/feed?link=http://example.com/embed/&access_token=USER_ACCESS_TOKEN& app_id=503449429707505 &type=game&url=http://example.com/embed/& title=Tutul Aplikacji& description=opis aplikacji
and it's not working cus the result is:
Me shared a link via Device.
I want to make somethink like:
Me scored some points in game SomeGame.
Thank you in advance for your help.

Related

Easy Facebook Android SDK : How to like a Page

I am using Easy Facebook android SDk v2.3. I could successfully access a page and get details of page including number of likes.
I am trying to implement like button in the app using setLikes(String likes); method of Page class but getting confused with what is to be passed as the parameter.
Sample Code :
p = Global.graphApi.getPage("Page ID");
p.setLikes(String likes); //what should likes be replaced with, replacing it with user id didn't work
Any help on this is appreciated.
According to the facebook documentation, (Page), you cannot like a Page via Graph API, even though you can read the like count information.
User, have to press the like button himself to like the page.
The accepted answer here may help you: like android application page in facebook from application itself

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

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

Android - facebook automatically post

I want to integrate an android app with facebook.
I've managed to fetch friends list and to post on wall on demand (a facebook url view is loaded and the user can post on wall whatever he texts).
I want, when the app is started and the user accepts the permisions, to post a message on wall that he is started to play my game without showing that url view for posting (an automatically post)
Can someone help me?
It's probably late and maybe you've got your answer for this question.
But for anyone else who need an answer:
First, you can use the Graph API, there is an example of how to post on
a wall.
But there is a restriction!!
Facebook is not allow us to enter a prefiil message!
The content of this message must come from the user itself!
Watch this video of Facebook on Platform Policy 2.3 Example and Explanation

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