How to implement your own like button in Android?

How can I implement OAuth authorization button like Quora's one?

  • Hello, I'd like to implement an OAuth2 authorization process in my web app just like Quora's. I mean: 1. In the login page, add a button to Authorize the app using a Google Account (Twitter, Facebook... doesn't matter) 2. When the button is pressed, new window is opened, that allows the user to authorize the app to use its data 3.- If the user authorizes the app, that new window is closed and the caller window (Quora home) is reloaded. Now, the user is logged in Quora, and can see his/her Quora home page. I'm stucked in the third step. I don't know how to close the new window and reload the caller, after OAuth process finishes. In my app, the new window shows the app when the user authorizes it (fallbacks to callback url). But I want that window closed and the caller one reloaded. I guess is a question of Javascript... Any clues? Many thanks in advance

  • Answer:

    I can provide my solution in the meantime while you are waiting for a more exact answer. Have you ever checked out https://oauth.io/? I find it simple to use. Plus it does what you want, in particular the new window is closed as soon as users authorize your app. It also takes care of the redirect url for you too which is nice.

Viriya Ratanasangpunth at Quora Visit the source

Was this solution helpful to you?

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.