Skip to content

Commit

Permalink
Merge pull request #127 from pbaris/master
Browse files Browse the repository at this point in the history
Upgrade Facebook Graph API to v3.2
  • Loading branch information
sayantam authored Apr 2, 2019
2 parents 018f76f + 17c759a commit 8cda16b
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 19 deletions.
22 changes: 17 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
target/
*.class
classes/
# Eclipse
.classpath
.settings/
.project
bin/
.settings/

# Intellij
.idea/
*.iml
*.iws

# Mac
.DS_Store

# Maven
log/
target/

# Node modules
node_modules/
2 changes: 1 addition & 1 deletion socialauth/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<groupId>org.brickred</groupId>
<artifactId>socialauth</artifactId>
<name>socialauth</name>
<version>4.15</version>
<version>4.16</version>
<description>SocialAuth library</description>
<url>http://code.google.com/p/socialauth/</url>
<licenses>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ of this software and associated documentation files (the "Software"), to deal

/**
* Provider implementation for Facebook
*
*
* @author Abhinav Maheshwari
* @author Tarun Nagpal
*
*
*/
public class FacebookImpl extends AbstractProvider {
private static final long serialVersionUID = 8644510564735754296L;

public static final String FB_API_VERSION = "v2.10";
public static final String FB_API_VERSION = "v3.2";
public static final String FB_API_URL = "https://graph.facebook.com/" + FB_API_VERSION;
private static final String PROFILE_URL = FB_API_URL + "/me?fields=id,name,picture,age_range,birthday,email,first_name,last_name,gender,location,locale";
private static final String CONTACTS_URL = FB_API_URL + "/me/friends";
Expand Down Expand Up @@ -99,7 +99,7 @@ public class FacebookImpl extends AbstractProvider {

/**
* Stores configuration for the provider
*
*
* @param providerConfig
* It contains the configuration of application like consumer key
* and consumer secret
Expand Down Expand Up @@ -133,7 +133,7 @@ public FacebookImpl(final OAuthConfig providerConfig) throws Exception {

/**
* Stores access grant for the provider
*
*
* @param accessGrant
* It contains the access token and other information
* @throws Exception
Expand All @@ -158,7 +158,7 @@ public void setAccessGrant(final AccessGrant accessGrant)
* This is the most important action. It redirects the browser to an
* appropriate URL which will be used for authentication with the provider
* that has been set using setId()
*
*
*/
@Override
public String getLoginRedirectURL(final String successUrl) throws Exception {
Expand All @@ -168,8 +168,8 @@ public String getLoginRedirectURL(final String successUrl) throws Exception {
/**
* Verifies the user when the external provider redirects back to our
* application.
*
*
*
*
* @param requestParams
* request parameters, received from the provider
* @return Profile object containing the profile information
Expand Down Expand Up @@ -261,7 +261,7 @@ private Profile authFacebookLogin() throws Exception {
/**
* Updates the status on the chosen provider if available. This may not be
* implemented for all providers.
*
*
* @param msg
* Message to be shown as user's status
* @throws Exception
Expand Down Expand Up @@ -297,7 +297,7 @@ public Response updateStatus(final String msg) throws Exception {
/**
* Gets the list of contacts of the user. this may not be available for all
* providers.
*
*
* @return List of contact objects representing Contacts. Only name will be
* available
*/
Expand Down Expand Up @@ -363,7 +363,7 @@ public void logout() {
}

/**
*
*
* @param p
* Permission object which can be Permission.AUHTHENTICATE_ONLY,
* Permission.ALL, Permission.DEFAULT
Expand All @@ -378,7 +378,7 @@ public void setPermission(final Permission p) {

/**
* Makes HTTP request to a given URL.It attaches access token in URL.
*
*
* @param url
* URL to make HTTP request.
* @param methodType
Expand Down Expand Up @@ -411,7 +411,7 @@ public Response api(final String url, final String methodType,

/**
* Retrieves the user profile.
*
*
* @return Profile object containing the profile information.
*/
@Override
Expand Down

0 comments on commit 8cda16b

Please sign in to comment.