1
votes

I want my game player to able to post game score to his facebook wall from WP7 game. I have gone through following tutorials

1> Tutorial: Logging Into Facebook with Windows Phone 7 (Silverlight) (source code is downloaded from their website.)

PROBLEM: After running sample project, i can login to facebook, but can't figure out how to post the message.

2> I have download sample project from github.

PROBLEM: When i open the project for WP7, a window pop up saying "Solution folder are not supported in this version of application. solution folder '.nudget' will be displayed as unavailable." I have tried downloading nuget updates as suggested by Prabir's Blog.

3> With this tutorial, i am able to login to facebook.

PROBLEM: unable to post any message. it display inside emulator "The remote server returned an error:NotFound".

please let me know if you find this question inappropriate or lack of research, i will romove question immediately. I am novice to both WP7 and C#. Please help me to correct above problems. Thanks in advance

EDIT : Finally got 3rd one working by making small changes in PGLogin.xaml.cs, just change "PRE" to "pre" in "wbLogin_LoadCompleted" method. but still not much satisfy. because its work and sometime don't. it's not stable. and don't know how to logout. any suggestion?

2
You can find your answer in this thread: stackoverflow.com/questions/4757924/… - Igor Meszaros

2 Answers

0
votes

Another user had this exact issue, it was resolved using the following code:

var args = new Dictionary<string, object>(); 
 args["name"] = "Check this out"; 
 args["link"] = "www.xyz.com"; 
 args["caption"] = ""; 
 args["description"] = "description"; 
 args["picture"] = ""; 
 args["message"] = "Check this out"; 
 args["actions"] = ""; 

FacebookAsyncCallback callBack = new FacebookAsyncCallback(this.postResult); 
 fbApp.PostAsync("me/feed", args, callBack);   

    private void postResult(FacebookAsyncResult asyncResult) 
    { 
        System.Diagnostics.Debug.WriteLine(asyncResult); 
    } 

Post to Facebook wall using WP7 and Facebook.dll

0
votes
ShareLinkTask shareLinkTask = new ShareLinkTask();
shareLinkTask.Title = "Divum Photo Browser";
shareLinkTask.LinkUri = new Uri(list_photos.ElementAt(index_).imageUrl, UriKind.Absolute);
shareLinkTask.Show();