简体   繁体   中英

Widget for retrieving the timeline of a user with Twitter4j, OAuth on Android

I see the sample codes and walkthroughs on how to register your application, get the pin/uid and retrieve the access token and use it in the OnNewIntent method.

How can I do this OAuth authentication for a widget instead of an application?

You need to start an Activity and start the Oauth flow from there.

You can use setOnClickPendingIntent to start an Activity if the user clicks on a part of the Widget, or use a Configuration Activity to have the user authenticate himself the moment the widget is placed on the homescreen.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM