Is it possible to post status updates to Twitter using Firebase?

大城市里の小女人 提交于 2019-12-12 03:46:24

问题


does anyone know if the new Google's Firebase can post tweets to Twitter?

I checked Google's Firebase website and it mentions that users can authenticate using their services. Once this authentication and authorization is done, I should have the required keys to access Twitter's API.

However, I was wondering if the Google's Firebase (Android SDK), can post tweets using one of its classes or methods automatically (without having to send an independent REST request from the Android app).


回答1:


There is no API in Firebase that posts to Twitter.

But you can get the access token when the user signs in and use that to post to twitter in your own code. For more info, see https://firebase.google.com/support/guides/firebase-web#get_the_access_token_numbered




回答2:


According to firebase.auth.TwitterAuthProvider one can store the access token and secret to access the twitter APIs. Though Get the access token there is an explicit warning of Twitter API not directly invokable! The authdata structure will return everything needed for the twitter API. And then you need to use Android OAuth2 to set the proper parameters with the different Twitter APIs.



来源:https://stackoverflow.com/questions/37639827/is-it-possible-to-post-status-updates-to-twitter-using-firebase

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!