Facebook High Scores Server - facebook

I want to merge my High Scores with facebook.
In other words, I don't want to mantain my own score server but I would like to let make the dirt work to facebook.
So I want to publish new scores and retrieve them to display in my game.
Can I do it? What API can I use? Is it possible with REST?
EDIT: Many games in fb show global scores & friends score. How can I do it?

You could write data to fb with this: http://wiki.developers.facebook.com/index.php/Data_Store_API_documentation
However, i'd reccomend using a more stable mature platform like Google app engine. Facebook's API's have been extremely flaky lately, and when I was using the facebook datastore, I'd often find it to be slow and even worse, return inconsistent results.

Related

Can I use facebooks game service for leaderboards and to send push notifications

I'm making a mobile game in Unity.
I would like to have a leaderboard of high scores for a person and their facebook friends who have also played the game.
Also I would like for a push notification to be sent to a player if one of their friends beats their high score.
Would it be possible to achieve those two things using facebooks game service? Or would I need to write a server of my own to handle this?
(ps. its ok if for example the person who got the high score is asked 'would you like to tell derp, herp and glerp that you beat their high scores' and it works that way)
I'm asking here as facebooks game service doesnt seems to have anyone I can email for support or even a forum (Only a closed facebook group which I am still pending)
Facebook allows you to store 1 variable per user, so you could use that to store a score for each user and make a leaderboard based on that.
For push notifications there are two different kinds, one is actually called local notifications and you can make those for free without a server, but the user has to open the app for you to schedule them.
If you want to use the push notifications to react to a user beating a score you would either have to have your own server or use one of the many services out there. Some are even free like this one: https://onesignal.com/?gclid=CjwKEAjwm_K_BRDx5o-sxq6ouXASJAC7TsFLhiWC9-XUm1Sryg6zgEeQU49wLR7_H3WzzwOAnhX_exoCYIzw_wcB (you would have to read up on it though, I just searched around a bit.
You can also ask your user if they want to tell their friends on facebook that they beat their score, but before you can do that you will have to gain the permission of the users involved. Once you get in to the facebook documentation there is a guide on how to do this.
Hope it helps
Peter

Accessing User 'Most Listened To' using Spotify / Echo Nest / Facebook API

I want to know if I can access a user's play history (more specifically what songs they listen to the most) for an app. The app I am building can perform the same goal with iTunes using their built-in play counter. I know Spotify uses a similar counter, but I assume for privacy concerns they don't want to deal with privacy concerns from concerned users. However, I saw a few instances where it was suggested that this task could be accomplished using Facebook's API, or Echo Nest's API. Please let me know if anyone has some constructive suggestions toward finding a way to legally obtain a particular users 'most listened to songs', or something to that effect.
SB
There's some documentation about Open Graph Music on the Facebook Developer homepage:
https://developers.facebook.com/docs/opengraph/music/
Baseline is that you only can request a User's play history if he gave you app the explicit right to read his data.
The relevant permissions would be
user_actions.music https://developers.facebook.com/docs/facebook-login/permissions/v2.1#reference-user_actions_music
user_actions:{app_namespace} https://developers.facebook.com/docs/facebook-login/permissions/v2.1#reference-user_actions__app_namespace_
Then, you should be able to request
GET /me/music.listens
according to https://developers.facebook.com/docs/reference/opengraph/action-type/music.listens/ You'll need to perform the aggregation of the most played songs/artists yourself, because there's no endpoint for that.

How do I store a user data for a FB application?

Say, I wrote a flash game for the Facebook and I want the user to be able to view his playing history (dates, points, highscores...). Do I necessarily have to build my own database for that? Are there any other options? I mean, ANY?
Facebook will provide some general statistics about your app (like the number of views), but if you want something as specific as points and high-score statistics, you will have to use your own database.
You could have your app publishing scores to Facebook, and also read them back from the API: https://developers.facebook.com/docs/scores/

Semantic-based recommender Facebook application

As a project of this semester my friend and I are thinking to make a semantic-based recommender Facebook application. For example, if I wanted to go "a trip to Europe", this application is intended to do the following: go search in my friends list and gives me back all photos albums having the name "Italy Travel" or even only containing a comment about "Eiffel Tower", my friends statuses related to anything in Europe, notes of my friends, links they have liked in other websites and other activities that show up in their news feed. And same goes if I want to watch a movie, read a book or study a subject...etc.
And my question is:
Is such thing possible to be
achieved within 3 months? knowing
that we have only the very basis
about Facebook API and semantic
related subjects.
If it is, what Ontology can we rely
on? And what other concepts should
we have as a starting block?
In 3 Months Most probably yes (depends upon how much you already know about Facebook API).
Things you should know before embarking on journey to develop this (Some i think are significant enough..)
Either you can go about developing whole Interaction Code between your server and Graph API yourself.
Or use some SDK that are already out there.(Some are mentioned in Facebook docs) Like Facebook C# SDK for C#.
Understanding of FQL and Graph API (Make some small project first to try and test things like getting user friend list).
Basic understanding of HTTP GET and POST requests and how to construct them in language of your choice.
Parsing JSON in your language.
Get a print out of documentation of selected topics for offline reference (I did that...)

Build a facebook app or web app?

I want to develop an online application and I am considering EITHER building a website with community features built in or building ONLY a facebook app. I was wondering if other people have had to make the same decision and what things I will need to consider.
The website I want to build will be an educational portal where people can make and take tests online
I disagree with some of the other answers here. There is a huge difference between a) trying to advertise a new place on the web and b) trying to advertise a new functionality of an existing place. Even if this new website would offer a very tight integration with Facebook and some other social platforms. Keep in mind: facebook users really don't like to leave facebook, no matter what the reason would be. That's why the click-through rate for the advertisements is so embarrassingly poor: http://en.wikipedia.org/wiki/Facebook#Company
That said you can of course always do both: build a website and offer the same functionality through a facebook app. However my opinion here is that if you're application only offers its users a single functionality, you'll be better off just doing the latter.
What exactly is the advantage you expect by creating a Facebook-ONLY-App for that?
If it's only about taking tests you can still build a "normal" portal and include some of the Facebook-functionality through the JavaScript-SDK, like posting to the wall, Single-Sign-On, find your friends and so on. This way the user still has the choice if he wants to connect with Facebook or not. This way you also don't minimize your userbase to Facebook-users
(yeah I know, "everyone" has Facebook these days... ;) Still not everyone wants it to be connected to every single site he's using through Facebook)
Considering this comment:
Well I guess its easier for people to recommend my app if it is a facebook app, is the main reason I want to know if facebook is a good option – Zubair Mar 3 at 14:51
Build a website and then add the Facebook 'like' button. See: http://developers.facebook.com/docs/guides/web/#plugins
You should put a Twitter button as well:
http://twitter.com/about/resources/tweetbutton
In my opinion you have to develop both. First develop you website. Although facebook is having millions of users But in my opinion you cannot implement every thing as freely as you can in your web application than facebook application. You should have a website and a page on facebook. You can integrate other facebook social plugins on your website to interact with facebook.
From monitization point of it is easy for new users on website than application on facebook. Other reason website especially related to educational purposes have a huge click through rate which you cannot find on facebook application advertiser.
What is the goal of the website?
If its to make money dont do a facebook app, you have far more control of your site by designing it entirely yourself.
If you want social networking features there are plenty of APIs you can tie in to which will provide you with functionality and allow you to link into facebook / twitter etc.
A website would look more professional, it would allow you to gather statistics on unique hits, revisits etc, having your own database of users means you can gather information and market your site more specifically ( which users took which tests).
A website also allows you to monetize it by adding advertisement if that is your goal, and you can gain search engine rankings.
If you want to get publicity for your website you can use facebook by creating a group / page for the site and promoting it that way.
Also your own website wont leave you vulnerable to changes in Facebook, what if you put in all this work and in a year the terms change and a portion of your app is now in violation of the terms. What if you want to add X feature and facebook wont allow it?
Basically your site = 100% in your controll, thats a big advantage to you. With facebook you loose that advantage but maybe gain a little in being able to use more of their features. Personally id always go for my own site.
You should go for the website first, then add the social elements in the website.
Like you can enable users to login using there facebook credentials. Like/share Button.
And later on, you can also go for the facebook app, when you want to shoot for much much more traffic. Therefore, whenever you think that you have figured out what exactly you want out of your application then only go for it, otherwise try your options with website. Because once your facebook app is up, you will get hell lot of traffic.
Let me know if you need help in creating facebook application or social elements enabled website. I have built an Facebook Easy API on top of all facebook features, which will enable you to easily access anything on facebook and meanwhile reducing your work effort.
You first build it like web app and use Graph API and FBConnect to use Facebook functionalities. Then you need to create a facebook app version also because getting facebook traffic is also required. People from facebook most like come to facebook app then to another web.
You will not need to convert it to facebook app, it will be just less in width and it would be a facebook iframe app. as I some where read that facebook is depreciating fbml and iframe app is recommended.
So now you can make both things, as I think , test app can have flexible layout so that you don't need to change width for facebook iframe. So you can both things by doing one.
thanks
i'm pretty sure many people will not agre with me, but IMHO you should focus on build a good Web-App that work well also on Mobile-Phones. keep it simple, intuitive, responsive, lightweight, cross-browser and straight to the point.
if your only concern is about "recommend your app to other people" make it SEO and Multi-Language too. google will do the rest.
then if you want make your app bold, slowly and planty of useless stuffs start to add all the facebook widget you want.
PS: i'm also on facebook, twitter,
flickr, google etc etc, i'm also
sharing photos, links and usefull
stuffs, my google rss reader is full
of links with tons of nice things, well i
have never had a minute to look at it, when i need something i just start searching google
I agree with most of the answers here—a native website is the way to go. Personally, I don't trust/like FB apps. Dunno what they do, and given the number of scammers out there and FB's lack of responsibility (IMO), I rarely if ever use an FB app.
Creating the website gives users choice about whether they want to share results/integrate with their FB wall/profile. Users don't like to be forced into something.
And in the spirit of adventure that is typical of SO, it's always more fun to build your own website than to build a template-based (sort of), boring and nearly irrelevant (drowning in a sea of other poorly made apps) FB app. But that's just my 2¢
In your case, I would do a hybrid. First, build your website, but integrate it with Facebook via connect. This way you can concentrate on building your value added services and let Facebook worry about the community.
I would also not ignore the Facebook app. Now, with iframes being fully supported on Facebook, you can adapt your existing site to work within Facebook with minimal effort, as long as you keep this requirement in mind when building your original application.