Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This property is not implemented by this class. Error in my project. #6

Open
Vijayadhas opened this issue Aug 25, 2014 · 0 comments
Open

Comments

@Vijayadhas
Copy link

I am following Your Instructions. It was working in my sample project. When i try to implement in my original project i get error.

private void LoginSucceded(string accessToken)
{
var fb = new FacebookClient(accessToken);

        fb.GetCompleted += (o, e) =>
        {
            if (e.Error != null)
            {
                Deployment.Current.Dispatcher.BeginInvoke(() =>
                {
                    MessageBox.Show(e.Error.Message);
                    return;
                });
            }

            var result = (IDictionary<string, object>)e.GetResultData();
            var id = (string)result["id"];

            var url = string.Format("/Views/FacebookInfoPage.xaml?access_token={0}&id={1}", accessToken, id);
            var rootFrame = (App.Current as App).RootFrame;
            Deployment.Current.Dispatcher.BeginInvoke(() =>
               {
                   rootFrame.Navigate(new Uri(url, UriKind.Relative));
               });
        };

        fb.GetAsync("me?fields=id");
    }

In this method i am getting error in this line: fb.GetAsync("me?fields=id");

error..System.NotImplementedException: This property is not implemented by this class.
at System.Net.HttpWebRequest.SetUserAgent(String value)
at System.Net.HttpWebRequest.set_UserAgent(String value)
at Facebook.HttpWebRequestWrapper.set_UserAgent(String value)
at Facebook.HttpWebRequestWrapper.TrySetUserAgent(String userAgent)
at Facebook.FacebookClient.PrepareRequest(HttpMethod httpMethod, String path, Object parameters,
Type resultType, Stream& input, Boolean& containsEtag, IList`1& batchEtags)
at Facebook.FacebookClient.ApiAsync(HttpMethod httpMethod, String path, Object parameters, Type resultType, Object userState)
at Facebook.FacebookClient.GetAsync(String path, Object parameters, Object userState)
at Facebook.FacebookClient.GetAsync(String path)
at TestReactive.com.beno.WP7Client.ViewModels.FacebookViewModel.LoginSucceded(String accessToken)
at TestReactive.com.beno.WP7Client.ViewModels.FacebookViewModel.webBrowser_Navigated(Object sender, NavigationEvPID:0ED1004E TID:0F8A0042 entArgs e)
at Microsoft.Phone.Controls.WebBrowser.FireNavigatedEvent(Uri uri)
at Microsoft.Phone.Controls.WebBrowserInterop.ReversePInvokeThunk.OnNavigated(Int32 webBrowserControlId, String uri)

Please help me to resolve this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant