Getting the credits balance from Facebook with the Facebook C# SDK in a Silverlight in browser app

792 views Asked by At

I have been able to get my Silverlight App connected to Facebook and get authenticated.

I am trying to pull the users credits balance into my Silverlight app the documentation at developers.facebook.com/docs/creditsapi has a one line example that references the Facebook Credits Sample application from Githu that is writen in php. looking at the file from the Githu example facebookapi_php5_restlib.php and the documentation Converting Facebook PHP examples I should be able to get the balance with something like this.

private void GetBalance()
{    
     var fb = new FacebookClient ( auth.Session.AccessToken );
     dynamic me = fb.Get ( "me" );
     Dictionary<string, object> parms = new Dictionary<string, object> ( );
     parms.Add ( me.id, "credit_balance" );
     fb.GetAsync ("/facebook/users/getInfo", parms, GetResults );
}

private void GetResults ( FacebookAsyncResult asyncResult )
{
}

With this variation I get back an error

asyncResult.error - {"(OAuthException) Unknown path components: /getinfo"}

I have tried diffent variation on the API path but have not been able to get this call to work and am hoping someone will be able to point me in the right direction.

1

There are 1 answers

2
el_tone On BEST ANSWER

You need to be on the Facebook credits special incentives scheme for this to work. In order to apply for the scheme you must have a live app that uses credits as its sole currency. You can apply for the scheme here.