0

I am getting security warning while using authentication in facebook app.My code is as shown with screenShot with security warning

private void imageFacebook_Tap(object sender, GestureEventArgs e)
{
    FaceBookBlocker.Visibility = Visibility.Visible;
    pop_up.IsOpen = true;

    //Get this from the facebook
    string appId = "My Facebook App Id";

    var parameters = new Dictionary<string, object>();
    parameters["client_id"] = appId;
    parameters["redirect_uri"] = "https://www.facebook.com/connect/login_success.html";
    parameters["response_type"] = "token";

    parameters["display"] = "touch";

    string extendedPermissions = "user_about_me,read_stream,publish_stream";

    // add the 'scope' only if we have extendedPermissions.
    if (!string.IsNullOrEmpty(extendedPermissions))
    {
        // A comma-delimited list of permissions
        parameters["scope"] = extendedPermissions;
    }

    var oauth = new FacebookOAuthClient();
    //Create the login url
    var loginUrl = oauth.GetLoginUrl(parameters);

    ////Open the facebook login page into the browser                     
    _webBrowser.Navigate(loginUrl);            
}

Image of the warning

Dan Barzilay
  • 4,974
  • 5
  • 27
  • 39
dinesh
  • 41
  • 4

3 Answers3

1

I do have resolved.Check my answer here. Escape from Facebook security Warning

Also replace http: with https: in the Facebook GraphAPI.

Community
  • 1
  • 1
Mansi Panchal
  • 2,357
  • 18
  • 27
0

There is going to be your code,where you connect to Facebook.Best guess would be Facebook has rolled out a security change to their API and the code being used by you has not been updated to work with the new API

Alternatively

You need to delete this bit of code

<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "// connect . facebook.net/en_US/all.js#xfbml=1";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

Looks like it is in your footer?

Syed Salman Raza Zaidi
  • 2,172
  • 9
  • 42
  • 87
0

I just hide BrowserControl if navigating to the success page

private void BrowserControl_Navigating(object sender, NavigatingEventArgs e)
        {            
            if (e.Uri.AbsolutePath.ToString() == "/connect/login_success.html")
            {
                BrowserControl.Visibility = Visibility.Collapsed;
            }
            if (NavigatingCallback != null)
            {
                NavigatingCallback();
            }

        }
Vovich
  • 321
  • 1
  • 3
  • 13