Facebook Api and Construct2 game Score - facebook-graph-api

I am Ishtiak Ahmed, studying in CSE dept of Islamic University of Technology and I’m from Bangladesh.
I am new to construct2. I’ve liked the game engine very much. For that reason I chose to make a game for my final project of 3rd year using Construct 2.
The game is an infinite runner game and I’m Making it for Facebook. I’ve used Facebook scoreboard for storing the score of my game user.
But the matter of fact is I am not able to see the scores of other players. I need the scores of the users of my game. But I am unable to do that.
Using Facebook’s graph API I can see only my score. But My teacher told me to implement such a thing so that I can see all the player score’s even who are not in my friend-list.
When I tried that I faced problem of getting user access token. But how can I get the access token using construct 2 . Is it possible to see all the scores of my game user. Please help me . I am in a great danger :(
Thanks in advance :)

I believe as far as Construct 2 goes working with Facebook, that you can only show scores of your friends who also play the game.
From this link: https://www.scirra.com/tutorials/58/how-to-make-a-facebook-game/page-5
Note that hi-score tables only show scores for the current user and
their friends. You can't see all player's scores. This is how the
Facebook Scores system works.
To allow others to see your score, you must use the Facebook object and login with the "user_friends" permission. The issue then is getting your friends to play the game just once to set a score. Then you should be able to see them. :)
For using the Facebook object and scoring you need only the APP ID and the APP Secret available on the Facebook developer dashboard for your app.

Related

want a common DataBase for Unity Game and a Website

I am making a game in unity 5 where i need to load description and items from a database which gets updated when we enter values in a website.
I need to know some way to consume asmx webservices in unity 5.
Can somebody tell me in detail How can i do that.
I don't know too much about Unity. I have only tinkered with the game engine. So the only advice I can offer is, try posting your question on this site https://gamedev.stackexchange.com/ (if you haven't already). It's the same thing as SO just for game development specifically. Good luck in your endeavors.

Need steps to implement facebook payment in my unity game

I made a game for Facebook canvas in unity, Now i want to sell items in my game with Facebook payment, The problem is i am not a good programmer and Facebook documentations are very hard to understand, so i need some simple steps to integrate payment to my game,
i registered Facebook payment company,
Now how to define product in my unity codes?
How to prompt dialog box?
what to write in callback URL in php?
please make it simple and clear for me
thanks
I think you need to investigate a bit more on how to achieve this, since there is a lot of information available. I'll try to clear some doubts of yours:
To define products for your game, you need to define an Open Graph Object, and upload it to a server (can be your own, or dropbox). Here is a guide from my blog, where I teach how to upload and host OG Objects for achievements, steps are similar.
The in-game code to use in Unity is the method Pay (FB.Canvas.Pay), which receives the url of your hosted OG Object, and some other parameters, and it prompts the user with the appropiate interface to pay (Keep in mind this only works when the game is inside the facebook canvas)
I Hope this starts to guide you on how to approach the paymet system!
I'll answer the questions in the comment here:
No, you don't need the Javascript SDK anymore. Just need to have the Unity SDK in your game.
I haven't found much information on the callback, but since I don't really use it, I just used this code inside a PHP script to just make it work:
$hub_mode = $_GET['hub_mode'];
$hub_challenge = $_GET['hub_challenge'];
$hub_verify_token = $_GET['hub_verify_token'];
if ($hub_verify_token =='YourToken')
{
echo $hub_challenge;
}

How to share score on Facebook status from Cocos2D-x App for BB Playbook/Z10?

My question is simple, but I can't find anything helpful, I hope you guys can help me.
In my game, when the player finish the game, there is a scene in my cocos2d-x game that ask for a name to enter in the score table. This scene has a Facebook button (that doesn't do any action right now) that is supposed to pop up a dialog and share the score on his wall with a simple message like "I just scored 7654296 points in "this game". ".
I can't find any example, the Facebook API is just for android and iOS. Is there any C++ native API that I can use?
Thanks in advance for any help you can provide.
The closest native C++ API is the stream output.
The C++ language has no knowledge of web pages, cookie files or graphics.
You'll need to search the web for platform specific API.

Weekly Facebook Scores clearing?

we want to do something that's relatively common among mobile games. We want to reset our Facebook scoreboard every week. I am surprised to find that - looking around - there is no automatic way to do this.
Is it in the plans to offer this functionality? A probably easier thing on Facebook's end that would work for us is if when we ask for friends scores, we get the date of each score, so we can then filter out the scores that are too old.
Other than that, it seems that we'd have to write a Windows Service or Cron task to call the Facebook every week and do this (or do it manually from Putty or other tool), neither of which seem accceptable for this small task.
Thank you and let us know!
-Brian Hunsaker
Technical Director # DarkTonic Games
There's no way to tell Facebook to wipe your app's Scores automatically, but you only need to make a single API call to wipe all scores:
https://graph.facebook.com/[APP ID]?access_token=[APP ACCESS TOKEN]&method=delete
This is mentioned here:
https://developers.facebook.com/docs/score/
The call to delete all the scores from your facebook App is as follows (may have changed):
https://graph.facebook.com/[APP ID]/scores?access_token=[APP TOKEN]&method=delete
it should return true.

What does facebook know about you with the likebox

We were having a beer talk and have something to clear out.
Is the following conclusion correct:
When I put a facebook-like-button-box on my page, does facebook know
every time I'm on that page, even if i'm not logged in.
basically the same as google analytics
if this nis correct, it should be possible to sandbox, the like-button until someone will use it. Then facebook gets only informations when the user actively confirms that.
cheers endo
No, they can't directly track you if you are not logged in and you view an external "like" button. They can, however, set a tracking cookie that identifies you when you sign in, which would allow them to match the tracking data in the current session to you.
One of Facebook's primary revenue streams comes from the analysis and sale of market trend information. They can analyse the likes and comment keywords of certain user clusters (e.g. middle-aged American females, teenagers in college, etc) and use these to produce statistics about market patterns and trends. They can also use keyword analysis to tell a company how many people are talking about something, e.g. "how many people have mentioned my latest blockbuster film?"
You could simply move the image and JavaScript code away from the Facebook servers and host it locally to avoid them from tracking your users.
In pre-emption of the "FACEBOOK = EVIL" arguments:
In the end, though, is it really a big issue? Some people see Facebook as this massive life-infringing uncaring supercorporation, but in reality they're just making a buck through completely anonymous statistics. No human being (or sentient robot) views your preferences, browser tracking data, or personal information. Everything is anonymised and turned into a bunch of numbers relating to a group. Sure, they could screw everyone over and be evil, but why bother when you already make that much money legitimately?