Coder Social home page Coder Social logo

socialauth-android's Introduction

TopImage

SocialAuth Android is an Android version of popular SocialAuth Java library. Now you do not need to integrate multiple SDKs if you want to integrate your application with multiple social networks. You just need to add few lines of code after integrating the SocialAuth Android library in your app. The API enables user authentication and sharing updates through different various social networks and hides all the intricacies of generating signatures & token, doing security handshakes and provide an easy mechanism to build cool social apps. With this library, you can:

  • Quickly build share functionality for posting updates on facebook, twitter, linkedin and more
  • Easily create a Share button or a social bar containing various social networks
  • Access profile of logged in user for easy user registration
  • Import friend contacts of logged in user (Email, Profile URL and Name)
  • Do much more using our flexible API like extend it for more network

###Whats new in Version 3.2 ?

  • Bugs Solved : Facebook issue solved. Now we are using native web view login. please check the wiki to create Facebook app using native flow.
  • Bugs Solved : Foursquare issue fixed
  • Bugs Solved : Signout bug fixed
  • Bugs Solved : Custom -UI example upload image bug fixed
  • Documentation Guides for Facebook, Google Plus, Flickr , Share-Menu and more

###Whats new in Version 3.1 ?

  • Bugs Solved : Twitter Recent API changes fixed

###Whats new in Version 3.0 ?

  • New Providers Support : Instagram , Flickr
  • New Example : Share- Menu - Now use provides in Android ShareAction Provider. Check wiki and example for use.
  • Contacts : Support added for Google Plus, Flickr , Instagram
  • Feeds : Support added for Google Plus, Instagram
  • Albums : Support added for Google Plus. Download Picasa Albums
  • Generic OAuth2 Provider : Users can create own oAuth2 Providers from sdk.
  • Bugs Solved : Publish Story bug for Facebook Solved
  • Bugs Solved : Get Profile Images for FourSquare
  • Bugs Solved : UI issues for Yahoo , Yammer Solved

###Whats new in Version 2.6 ?

  • Linkedin Career Plugin Added to show information for job , education , recommendations.
  • Linkedin feed plugin added.
  • Now get profile images for your contacts on Facebook , Twitter and !Linkedin.
  • Now you can post message on all connected providers at once.
  • Examples updated.
  • Bug fixes

Check Getting Started to start.

###How does it Work?

Once SocialAuth Android is integrated into your application, following is the authentication process:

  • User opens the app and chooses the provider to request the authentication by using SocialAuth-android library.
  • User is redirected to Facebook, Twitter or other provider's login site by library where they enter their credentials.
  • Upon successful login, provider asks for user’s permission to share their basic data with your app.
  • Once user accepts it,On successful authentication the library redirects user to app.
  • Now user can call SocialAuth Android library to get information about user profile, gets contacts list or share status to friends.

UserFlow

SocialAuth Android is distrubuted under MIT License.

About this project

![3Pillar Global] (http://www.3pillarglobal.com/wp-content/themes/base/library/images/logo_3pg.png)

SocialAuth Android is developed and maintained by 3Pillar Global.

socialauth-android's People

Contributors

sayantam avatar stefanbaritchii avatar vineetmobile avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

socialauth-android's Issues

Upload image to all connected providers simultaneously

Dear 3PillarLabs
How to implement async upoad to all connected providers simultaneously.
Here is the case : I make a several checkboxes for Providers, i put a listener to every checkbox so if user click it, the will sign in to the following provider. If user uncheck it, it will be log-out from the following provider. Then i put a button on the bottom of screen and if user click it, for every provider checkbox which is checked, the apps will upload to it.
(It diffrent from custom-ui case, when you sign-in to a provider it will post the image one-by-one ) I've fork the library, and i've add some custom function to do that, but i always get HTTP 400 Response code
Here Is My additional code in 'SocialAuthAdapter. java'

/**
 * Asynchronous Method to upload image to All provider.Returns result in
 * onExecute() of AsyncTaskListener.Currently supports Facebook and Twitter
 * 
 * @param message
 *            message to be attached with image
 * @param fileName
 *            image file name
 * @param bitmap
 *            image bitmap to be uploaded
 * @param quality
 *            image quality for jpeg , enter 0 for png
 */
public void uploadImageToAllProviderAsync(String message, String fileName, Bitmap bitmap, int quality,
        SocialAuthListener<Integer> listener) throws Exception {
    ByteArrayOutputStream bos = new ByteArrayOutputStream();
    if (fileName.endsWith("PNG") || fileName.endsWith("png")) {
        bitmap.compress(CompressFormat.PNG, 0, bos);
    } else if (fileName.endsWith("JPEG") || fileName.endsWith("JPG") || fileName.endsWith("jpg")
            || fileName.endsWith("jpeg")) {
        bitmap.compress(CompressFormat.JPEG, quality, bos);
    } else {
        throw new SocialAuthException("Image Format not supported");
    }

    InputStream inputStream = new ByteArrayInputStream(bos.toByteArray());
    final List<String> activeproviders = socialAuthManager.getConnectedProvidersIds();
    for (int i = 0; i < activeproviders.size(); i++) {
        final String provider = activeproviders.get(i);

        if (provider.equalsIgnoreCase("facebook")|| provider.equalsIgnoreCase("twitter")) {
            new UploadImageToAllTask(listener,provider).execute(message, fileName, inputStream);
        } else {
            throw new SocialAuthException("Provider not Supported");
        }
    }

}

/**
 * AsyncTask to UploadImage
 */
private class UploadImageToAllTask extends AsyncTask<Object, Void, Integer>{

    SocialAuthListener<Integer> listener;
    String provider;
    public UploadImageToAllTask(SocialAuthListener<Integer> listener,String provider){
        this.listener = listener;
        this.provider = provider;
    }

    @Override
    protected Integer doInBackground(Object... params) {
        Response res = null;
        try {
            res = socialAuthManager.getProvider(provider).uploadImage((String) params[0], (String) params[1], (InputStream) params[2]);
            Log.d("SocialAuthAdapter", "Image Uploaded");
            return Integer.valueOf(res.getStatus());
        } catch (Exception e) {
            listener.onError(new SocialAuthError("Image Upload Error", e));
            return null;
        }
    }

whats my wrong ? Why do i always get 400 error code if try to upload to facebook and twitter simlutaneously ?

Twitter Authorization - getAuthenticaionUrl error

When connecting with Twitter I receive this error:

org.brickred.socialauth.exception.SocialAuthConfigurationException?: Application keys are not correct. The server running the application should be same that was registered to get the keys.

(1) the keys are correct
(2) addCallback() sets the same URL used as the callback in Twitter Apps page.

I can get around the problem by providing my own URL within the SocialAuthAdapter by commenting out this line:

url = socialAuthManager.getAuthenticationUrl(provider.toString(), provider.getCallBackUri())+ "&type=user_agent&display=touch";

And supplying my own OAuth URL. All other providers work. May be an issue with how the URL is formed by the socialAuthManager.

Photo Sharing with twitter usinn hashtag #BrightsparkTravel is not working.

Hi all,

I am using this library for social sharing. We are adding hashtags to the message field of method adapter.uploadImageAsync(), Twitter photo sharing works fine with other hashtags we have but when we specify the hashtag #BrightsparkTravel, it is not sharing the photo and status code is 403.

Please help us, what we need to to. We are using this library for our crucial project.

Many Thanks.

Asif Javaid.

Polling state to see if already logged into a provider

I can't resume my app and poll social auth to see if the user is logged in using one of the providers. For example they have to log in again and they won't get prompted because they're already logged in, but I can't find that out on app load to just automatically log them in.

Unable to set Permissions

One is not able to set permissions to the provider as 'currentProvider' is just set in the 'authorize' method.

User birthdate from Google Plus

Hi,

How can I find user birthday from Google plus using this library. Currently i am getting other user information like gender , first name , email except user birthday.

Please help me.

thanks

Foursquare Fix

Hello,

Love the library and keep up the good work.
Do you know when Foursquare will be fixed. I noticed the Auth URL is wrong.

Is this project active?

This is not an issue per se but an inquiry:

I'm in the process of making a lot of enhancement and additions to this library, and I'm wondering whether it's an active, maintained project?

Can not run callback when can not tweet on Twitter

Custom UI -> MessageListener

When I tweet on Twitter, it never run to Callback when Message not posted (When I post 1 message 2 or 3 times).

// To get status of message after authentication
private final class MessageListener implements SocialAuthListener<Integer> {
    @Override
    public void onExecute(String provider, Integer t) {
        Integer status = t;
        if (status.intValue() == 200 || status.intValue() == 201 || status.intValue() == 204)
            Toast.makeText(CustomUI.this, "Message posted on" + provider, Toast.LENGTH_LONG).show();
        else
            Toast.makeText(CustomUI.this, "Message not posted" + provider, Toast.LENGTH_LONG).show();
    }

    @Override
    public void onError(SocialAuthError e) {

    }
}

How to change the client id

Hi team, You done a great job...
I want to change the client Id and redirect uri for Google Plus and Facebook sign in.
When I am try to sign in it shows like sharing details with your client id and redirect uri.
But this is not good for the users.

Can you please tell me how to change the client id and redirect uri in the jar file.

Get Date Of Birth

How to get date of birth from facebook.?

i am following socialauth-android/wiki/Getting-UserProfile link.

Does Facebook gives user date of birth?

Guide Instagram client app configuration

Hi,

Can you create a guide to Instagram client app configuration?

I'm try to login but the dialog isn't closed after login performed (successful I think because any error is shown). If I put my consumer keys into custom-ui example the same error occurs then I suppose it is a configuration error.

I have tried all possible combinations of "Disable implicit OAuth" and "Enforce signed header" options.

Thanks,

Facebook Native Flow

hey, when you talk about to "facebook native flow", you mean say that the library can be used with facebook SSO? I searched in the wiki without results.

SocialAuth configuration is null

Tested for G+ and Twitter, results both in:

04-01 19:20:47.855 25194-25216/com.frigoshare D/SocialAuthError﹕ org.brickred.socialauth.exception.SocialAuthConfigurationException: SocialAuth configuration is null.
04-01 19:20:47.855 25194-25216/com.frigoshare D/Error﹕ URL Authentication error

The last one is just a print of the socialAuthError.getMessage().

Followed this tutorial: http://blog.3pillarglobal.com/part-3-using-socialauth-integrate-twitter-api-android

So I added:

try {
adapter.addConfig(SocialAuthAdapter.Provider.TWITTER, "bla", "bla", "r");
} catch (Exception e) {Log.d("Error", e.getMessage()); }
adapter.addProvider(SocialAuthAdapter.Provider.TWITTER, R.drawable.twitter);

This worked but can you give me the possible values of the permissions. Why doesn't the application use the oauth_consumer.properties?

Cannot fetch contacts from Facebook Content Provider

Hi,

I am getting null (or did not receive any contacts) when I user get Contact List method on social adapter. I have made sure that Provider has all necessary permission.

What's wrong ? How can I fetch friend lists ?

How to post my twitter feed for my users to view?

Is this currently possible with socialauth? Right now I've only tried viewing the feed of the user who is currently logged in. How about broadcasting my feeds for the users to see? This is what I want to achieve for my app.

Facebook return status not updated. Return Status code :403.

In samples custom-ui and share button, when try to post a message, log returns:

02-05 13:16:39.757: I/FacebookImpl(28375): Updating status : yktjtktk
02-05 13:16:39.917: D/SocialAuthError(28375): org.brickred.socialauth.exception.SocialAuthException: org.brickred.socialauth.exception.SocialAuthException: Status not updated. Return Status code :403
02-05 13:16:39.917: D/Custom-UI(28375): Error
02-05 13:16:39.917: W/System.err(28375): org.brickred.socialauth.android.SocialAuthError: Message Not Posted
02-05 13:16:39.917: W/System.err(28375): at org.brickred.socialauth.android.SocialAuthAdapter$6.run(SocialAuthAdapter.java:862)
02-05 13:16:39.917: W/System.err(28375): at java.lang.Thread.run(Thread.java:841)

  • Log in is ok.
  • Auth app in FB is ok.
  • Other calls like User profile works.

getting null pointer when using signout

I have succesfully logged in with socialAuth but when ever i use the adapter.signout method , i am getting null pointer exception.

Code

socialAuthAdapter.signOut(getActivity(), SocialAuthAdapter.Provider.FACEBOOK.toString());

logout not working

When I logout a user on facebook they are automatically logged in every time in facebook afterwards, never prompted again.

adapter.getCurrentProvider().logout(); <--doesn't work

Twitter email address returning null

I need application to access email address associated with user's twitter account but twitter is returning null. How to get user's email when user provides access to profile??

update market link !

Please update this link :market://details?id=com.facebook.katana
in onPageStart .

Verification code is null Instagram

Hello,

I am integrating Instagram provider with socialauth and I get an error "Verification code is null" while login. I have changed the callback url for my app correctly but I can login. A webview opens with my app info for authorizing the access as expected.

Best regards,

setDialogSize is useless

Hi !

In SocialAuthAdapter.java:770, your method setDialogSize is useless since you set in SocialAuthDialog.java DIMENSIONS_DIFF_LANDSCAPE and DIMENSIONS_DIFF_PORTRAIT in the declaration scope

"width" and "height" are overridden by method, but they're only used to define both previous variables.

Did I miss something ?

Instagram Login issue

Hi 3pillarslabs,
Thanks for your easy library for managing the social network.
I am facing an issue during integration with Instagram. The redirectURl is correct. But I see an error code -2 in the WebView onReceiveError(). May I know what it is ? and what could be a the cause of error for me ?

Thanks in advance.

10-25 00:13:44.996: D/SocialAuth-WebView(32160): onPageStart:https://api.instagram.com/oauth/authorize?client_id=48d42b88af4a425f85e30732a2b7610f&response_type=code&redirect_uri=http%3A%2F%2Fcaic.instagram.api.uri&type=user_agent&display=touch
10-25 00:13:48.098: D/SocialAuth-WebView(32160): onPageStart:https://instagram.com/oauth/authorize?client_id=48d42b88af4a425f85e30732a2b7610f&response_type=code&redirect_uri=http%3A%2F%2Fcaic.instagram.api.uri&type=user_agent&display=touch
10-25 00:13:48.099: D/SocialAuth-WebView(32160): Override url: https://instagram.com/oauth/authorize?client_id=48d42b88af4a425f85e30732a2b7610f&response_type=code&redirect_uri=http%3A%2F%2Fcaic.instagram.api.uri&type=user_agent&display=touch
10-25 00:13:52.424: D/SocialAuth-WebView(32160): onPageStart:http://caic.instagram.api.uri/?code=27b4f392ebfb4fc5aaf2820b5c0134a7
10-25 00:13:52.429: I/SocialAuthManager(32160): Connecting provider : instagram
10-25 00:13:52.430: I/InstagramImpl(32160): Verifying the authentication response from provider
10-25 00:13:52.432: I/OAuth2(32160): Verifying the authentication response from provider
10-25 00:13:52.561: D/SocialAuth-WebView(32160): Override url: http://caic.instagram.api.uri/?code=27b4f392ebfb4fc5aaf2820b5c0134a7
10-25 00:13:52.576: D/SocialAuth-WebView(32160): Inside OnReceived Error
10-25 00:13:52.576: D/SocialAuth-WebView(32160): -2
10-25 00:13:52.576: D/SocialAuthError(32160): java.lang.Exception: http://caic.instagram.api.uri/?code=27b4f392ebfb4fc5aaf2820b5c0134a7
10-25 00:13:52.618: I/chromium(32160): [INFO:CONSOLE(12)] "Not allowed to load local resource: file:///android_asset/webkit/android-weberror.png", source: data:text/html,chromewebdata (12)
10-25 00:13:52.687: W/UnimplementedWebViewApi(32160): Unimplemented WebView method run called from: android.os.Handler.handleCallback(Handler.java:733)
10-25 00:13:52.727: W/UnimplementedWebViewApi(32160): Unimplemented WebView method run called from: android.os.Handler.handleCallback(Handler.java:733)

10-25 00:13:54.032: W/System.err(32160): org.brickred.socialauth.exception.SocialAuthException: java.io.FileNotFoundException: https://api.instagram.com/oauth/access_token
10-25 00:13:54.033: W/System.err(32160): at org.brickred.socialauth.oauthstrategy.OAuth2.verifyResponse(OAuth2.java:181)
10-25 00:13:54.033: W/System.err(32160): at org.brickred.socialauth.provider.InstagramImpl.doVerifyResponse(InstagramImpl.java:309)
10-25 00:13:54.033: W/System.err(32160): at org.brickred.socialauth.provider.InstagramImpl.verifyResponse(InstagramImpl.java:298)
10-25 00:13:54.033: W/System.err(32160): at org.brickred.socialauth.SocialAuthManager.connect(SocialAuthManager.java:184)
10-25 00:13:54.033: W/System.err(32160): at org.brickred.socialauth.android.SocialAuthDialog$SocialAuthWebViewClient$2.run(SocialAuthDialog.java:398)
10-25 00:13:54.033: W/System.err(32160): at java.lang.Thread.run(Thread.java:841)
10-25 00:13:54.033: W/System.err(32160): Caused by: java.io.FileNotFoundException: https://api.instagram.com/oauth/access_token
10-25 00:13:54.034: W/System.err(32160): at com.android.okhttp.internal.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:186)
10-25 00:13:54.034: W/System.err(32160): at com.android.okhttp.internal.http.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:246)
10-25 00:13:54.034: W/System.err(32160): at org.brickred.socialauth.util.Response.getResponseBodyAsString(Response.java:104)
10-25 00:13:54.034: W/System.err(32160): at org.brickred.socialauth.oauthstrategy.OAuth2.verifyResponse(OAuth2.java:179)
10-25 00:13:54.034: W/System.err(32160): ... 5 more

Facebook Graph v2.0 API

Is socialauth-android supports Facebook v2.x API?
Got this warning:
screenshot_2014-10-25-13-14-04

Is graph API v2.0 will be used automatically or I'll have to use another API when Facebook will drop the support for graph API v1.0?

Thanks.

Google login

OpenID support will end in April 2015. Need to switch to openid connect (oauth2).

G+ Contacts

When fetching my G+ contacts, the sdk fetches all my Google contacts (also not G+ related ones). Is there a way of only fetching my public Google+ circle or a more specific circle. Or is this more an issue for socialauth in general?

This is also refelected in the id of a feteched contact. The id doesn't match a G+ profile. If I only fetch my own profile data, I'll get the right information.

oauth_consumer.properties not found

I am using SocialAuth library for auth user with Facebook, Twitter and Google. I have some Questions.

I am getting below error in log cat

D/SocialAuthAdapter﹕ Selected provider is facebook
D/SocialAuthAdapter﹕ Loading keys and secrets from configuration
D/SocialAuthAdapter﹕ oauth_consumer.properties not found
D/SocialAuthAdapter﹕ Could not load configuration
D/SocialAuthAdapter﹕ Starting webview for authentication
D/SocialAuthError﹕ org.brickred.socialauth.exception.SocialAuthConfigurationException: SocialAuth configuration is null.
E/Login activity﹕ URL Authentication error

Below is my folder structure

enter image description here

My LoginActivity.java

public class LoginActivity extends ActionBarActivity {

private SocialAuthAdapter adapter;

//Android Component
private Button fb_button, tw_button, g_button;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    getSupportActionBar().hide();
    setContentView(R.layout.activity_login);

    //Social Adapter
    adapter = new SocialAuthAdapter(new DialogListener() {
        @Override
        public void onComplete(Bundle bundle) {
            adapter.getUserProfileAsync(new SocialAuthListener<Profile>() {
                @Override
                public void onExecute(String s, Profile profile) {
                    Log.e("Custom UI", "Login Receiving Data");
                    Profile profileMap = profile;
                    Log.d("Custom-UI",  "Validate ID         = " + profileMap.getValidatedId());
                    Log.d("Custom-UI",  "First Name          = " + profileMap.getFirstName());
                    Log.d("Custom-UI",  "Last Name           = " + profileMap.getLastName());
                    Log.d("Custom-UI",  "Email               = " + profileMap.getEmail());
                    Log.d("Custom-UI",  "Gender              = " + profileMap.getGender());
                    Log.d("Custom-UI",  "Country             = " + profileMap.getCountry());
                    Log.d("Custom-UI",  "Language            = " + profileMap.getLanguage());
                    Log.d("Custom-UI",  "Location            = " + profileMap.getLocation());
                    Log.d("Custom-UI",  "Profile Image URL   = " + profileMap.getProfileImageURL());
                }

                @Override
                public void onError(SocialAuthError socialAuthError) {
                    Log.e("Custom UI", "Profile Data Error");
                }
            });
        }

        @Override
        public void onError(SocialAuthError socialAuthError) {
            Log.e("Login activity", socialAuthError.getMessage());
        }

        @Override
        public void onCancel() {

        }

        @Override
        public void onBack() {

        }
    });


    //Wire up the Login Buttons
    fb_button = (Button) findViewById(R.id.buttonFB);
    tw_button = (Button) findViewById(R.id.buttonTwitter);
    g_button = (Button) findViewById(R.id.buttonGoogle);

    //Event Listener for Click

    //Facebook
    fb_button.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            adapter.authorize(LoginActivity.this, SocialAuthAdapter.Provider.FACEBOOK);
            Toast.makeText(LoginActivity.this, "I am Facebook", Toast.LENGTH_SHORT).show();
        }
    });

    //Twitter
    tw_button.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            adapter.addCallBack(SocialAuthAdapter.Provider.TWITTER,"http://domain.com/auth/twitter");
            adapter.authorize(LoginActivity.this, SocialAuthAdapter.Provider.TWITTER);
            Toast.makeText(LoginActivity.this, "I am Twitter", Toast.LENGTH_SHORT).show();
        }
    });

    //Google
    g_button.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            adapter.addCallBack(SocialAuthAdapter.Provider.GOOGLE,"http://domain.com/google");
            adapter.authorize(LoginActivity.this, SocialAuthAdapter.Provider.GOOGLE);
            Toast.makeText(LoginActivity.this, "I am Google", Toast.LENGTH_SHORT).show();
        }
    });

  }

}

Some more doubts

What will be use of callback url in app. what will be posted at callback url?

How can I show this login screen only first time ?

One way will be SharedPreference to store the settings of user logged in, is there any way in SocialAuth library to do this.

Thanks for this Library its great but documentation can be improved.

I am getting below error in log cat, its saying not able to load the oauth_consumer.properties

Here is full question on StackOverflow

Unable to upload image to other providers(e.x flickr, instagram)

What steps will reproduce the problem?
1.Sign in to flickr or instagram
2.Call SocialAuthAdapter uploadImage method
3.Throws an exception

What is the expected output? What do you see instead?
I would have wanted to be able to upload image to flickr and instragram

What version of the product are you using? On what operating system?
socialauth-4.4
socialauth-android-3.1

Please provide any additional information below.
I took a look at SocialAuthAdapter.java and saw that uploading image filters providers only for facebook and twitter.
Is it possible to upload image for flickr and instagram or add support to it?

Maven Central

This is an amazing library. If possible, we wish to see this one Mavencentral.

Create Own Provider Issue

I try to create own Provider (for Russian social networks VKontakte and Odnoklassniki) through oAuth2 , like described in this thread. But any way I get error " is not a provider or valid OpenId URL". What kind of steps I doing wrong?


StackTrace:


D/SocialAuthAdapter﹕ Selected provider is
D/SocialAuthAdapter﹕ Loading keys and secrets from configuration
I/SocialAuthConfig﹕ Loading application configuration
D/SocialAuthAdapter﹕ Starting webview for authentication
D/SocialAuthError﹕ org.brickred.socialauth.exception.SocialAuthException: is not a provider or valid OpenId URL
W/System.err﹕ org.brickred.socialauth.android.SocialAuthError: URL Authentication error
W/System.err﹕ at org.brickred.socialauth.android.SocialAuthAdapter$4.run(SocialAuthAdapter.java:648)
W/System.err﹕ at java.lang.Thread.run(Thread.java:856)


"assets/oauth_consumer.properties" part for VKontakte:


# VKontakte

socialauth.vkontakte = org.brickred.socialauth.provider.GenericOAuth2Provider
vkontakte.consumer_key = 4117468
vkontakte.consumer_secret = tj9LhYsNJliE1w6IwtDM
vkontakte.custom_permissions = wall,groups,photos,offline
vkontakte.authentication_url = https://oauth.vk.com/authorize
vkontakte.access_token_url = https://oauth.vk.com/access_token


Can You help me or I need to use different oAuth library like KateSDK ? It's bad for me, I just want one style type auth in my app.
Waiting for Your answer ASAP. Thank You.

Calling SocialAuthAdapter from Service / background thread

May I request adding ability to run/call from background thread functionality to SocialAuthAdapter?

Currently it relies on UI elements for authorization and it makes it hard to implement (for example a service to post messages or pull data from a provider in background)

May be a incorporating Android notifications for authorization would eb a solution?

OAuth2.0 consumer_key and consumer_secret

I'm a bit thrown by this. Your "Guide Google" page (found here: https://github.com/3pillarlabs/socialauth-android/wiki/Guide-Google) is out dated in that it probably uses OAuth 1, which has been deprecated. It also has the heading of "Step by Step Guide to Get Twitter consumer key and secrets" while it's for Google :\

Are you able to update this soon?

I'm sifting through the Google API pages and documentation, but various terms are being used for the same things and I'm referred to pages or menu options that don't exist so I'm very confused and am hoping that this is monitored. :\

Kind regards,
E.

how to like a post and get share count

how to like a post and get share count

I tried some code to connect the facebook SDK and social auth library, but failed

private void Integrate() {
Globals.facebookAdapter = new SocialAuthAdapter(new DialogListener() {

    @Override
    public void onError(SocialAuthError arg0) {}

    @Override
    public void onComplete(Bundle arg0) {}

    @Override
    public void onCancel() {}

    @Override
    public void onBack() {}

});

try {
    Globals.facebookAdapter.addConfig(Provider.FACEBOOK,
            getString(R.string.app_id), Session.getActiveSession()
                    .getAccessToken(), null);
} catch (Exception e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
}
Globals.facebookAdapter.authorize(MainHome.this, Provider.FACEBOOK);}

This results in an authentication dialog. which is not what i want.

Use browser instead WebView to avoid entering login/password

Hi, I'm not deep in Oauth theme, so maybe I misunderstand something.

It would be cool if app can authenticate without entering login/password (if they were entered before) - just press Agree button.

As I understand it's not possible because WebVew's have not access to browser sessions/cookies, but we can use OS browser instead.
So, why to use WVs but not browser?

Thanks,
Victor

Sending email through gmail

I can get the user's contacts list by authenticating from google plus using socialauth library. On the page:-

http://code.google.com/p/socialauth-android/

It is mentioned that email through native clients is supported. I can see Provider.Email is there, but can't figure out anything further than that. How would we send email through gmail using user's credentials?

Cannot get publish_actions from facebook (after review)

"Your app cannot embed the Facebook Login dialog inside a custom web view. Utilize our native Facebook Login SDK, so that users do not need to login twice."

Unapproved publish_actions
People must enter all content in the user message field. Your app can't auto-populate the message field with any content, including links and hashtags, even if you allow users to edit the content before sharing.
Please remove any pre-filled text from your shared content before resubmitting for review.
You can find more detail and examples in this informational video, and in Platform Policy 2.3"

Did anyone encounter this problem?

Setting properties at runtime

Hello !

Is there a way to set the key and api properties at runtime ?
Because on th e app I'm working on, those informaions come from a webservice...

thanks !

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.