Make sure to fill in your Imgur app Client ID and Client Secret in MyAppConstants.java
.
This example uses Android Studio and Gradle.
Imgur example Android app
Home Page: http://api.imgur.com/
Make sure to fill in your Imgur app Client ID and Client Secret in MyAppConstants.java
.
This example uses Android Studio and Gradle.
When a user presses Enter in the username or password field of the LoginActivity (possible in Swiftkey, can't speak for AOSP keyboard), he is directed to the redirect URL of his API with an access denied info in the URL params.
This triggers the parsing of the TokenURL but crashes the Matcher (because obviously, there are no tokens to be found).
Surrounding the matching parts with try/catch and setting the WebView URL to the original one in the catch part - together with a Toast for the user reminding him to click on allow - is a hacky but quick way to solve the problem.
As this part will probably the most copied one, a fix would be great. Another question: Is the API actually working as it should if it redirects the user even when access is denied?
Other than that, I really enjoy working with your API, keep the great work up!
Cheers,
Rob
When trying to login, I get a force close no matter what I do:
A similar stack trace for each try:
11-19 21:33:55.756 1279-1279/com.imgur.api3example E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.IllegalStateException: No successful match so far
at java.util.regex.Matcher.ensureMatch(Matcher.java:579)
at java.util.regex.Matcher.group(Matcher.java:352)
at com.imgur.api3example.login.LoginActivity$1.shouldOverrideUrlLoading(LoginActivity.java:48)
at android.webkit.CallbackProxy.uiOverrideUrlLoading(CallbackProxy.java:270)
at android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:372)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5041)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
at dalvik.system.NativeStart.main(Native Method)
I'm trying to authenticate using Scribe in my app, but having a bit of trouble understanding the workflow (I assumed I'd get a response directly, rather than requiring a webview or something).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.