Skip to content

Commit 181faec

Browse files
committed
- Update Facebook Graph API version
1 parent 5cd44ac commit 181faec

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Rock/Security/Authentication/Facebook.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ public static string GetFacebookUserName( FacebookUser facebookUser, bool syncFr
403403
// If person does not have a photo, try to get their Facebook photo
404404
if ( !person.PhotoId.HasValue )
405405
{
406-
var restClient = new RestClient( string.Format( "https://graph.facebook.com/v17.0/{0}/picture?redirect=0&type=square&height=400&width=400", facebookId ) );
406+
var restClient = new RestClient( string.Format( "https://graph.facebook.com/v24.0/{0}/picture?redirect=0&type=square&height=400&width=400", facebookId ) );
407407
var restRequest = new RestRequest( Method.GET );
408408
restRequest.RequestFormat = DataFormat.Json;
409409
restRequest.AddHeader( "Accept", "application/json" );
@@ -457,7 +457,7 @@ public static string GetFacebookUserName( FacebookUser facebookUser, bool syncFr
457457
restRequest.RequestFormat = DataFormat.Json;
458458
restRequest.AddHeader( "Accept", "application/json" );
459459

460-
var restClient = new RestClient( string.Format( "https://graph.facebook.com/v17.0/{0}/friends", facebookId ) );
460+
var restClient = new RestClient( string.Format( "https://graph.facebook.com/v24.0/{0}/friends", facebookId ) );
461461
var restResponse = restClient.Execute( restRequest );
462462

463463
if ( restResponse.StatusCode == HttpStatusCode.OK )
@@ -523,7 +523,7 @@ public ExternalRedirectAuthenticationResult Authenticate( ExternalRedirectAuthen
523523
restRequest.AddParameter( "access_token", accessToken );
524524
restRequest.RequestFormat = DataFormat.Json;
525525
restRequest.AddHeader( "Accept", "application/json" );
526-
restClient = new RestClient( "https://graph.facebook.com/v17.0/me?fields=email,last_name,first_name,link" );
526+
restClient = new RestClient( "https://graph.facebook.com/v24.0/me?fields=email,last_name,first_name,link" );
527527
restResponse = restClient.Execute( restRequest );
528528

529529
if ( restResponse.StatusCode == HttpStatusCode.OK )

0 commit comments

Comments
 (0)