How to tweet with the app name, not on behalf of the owner of the app/developer - twitter

I'm using Twitter API for my website in PHP.
I have created a developer account "me" let's say.
I have then created an app named "myapp". I've generated tokens and keys with Read&Write permissions.
My problem : when I tweet via my website (using the API) and using my app tokens and keys, my tweets appear in https://twitter.com/me as if "me" were the author of the tweet, and the app name does not appear anywhere...
How could I tweet with my app name as the author ?
To be more clear, I would like to see the tweets posted (via the API using the tokens and keys of "myapp") in https://twitter.com/myapp and with "myapp" as the author of the tweet.
Thanks a lot for your help.

By definition, your app posts on behalf of an account that has granted permissions, so what you're seeing is "working as expected" from the outside. In order to have your app be an author, create an account specifically for it to tweet to.
The app technically still won't be the author, your dedicated account is, but you would (probably) set up that dedicated account to represent your app (URL if it's public, icon/photo, etc).
Note that you'll use the auth keys you get when attaching the app to the custom account instead of the ones that you're currently using for attaching it to your developer account.

Related

Facebook login getting user's groups

Asking this again because all info I can find only is for older api versions and not very useful.
I have a private Facebook group and am building a web app for which I'd like members to be able to access through facebook login.
That requires me to either
1. access a user's list of groups they are members of or
2. access my group's user list
I can't find any explicit documentation to do this - There seems to be a "Groups API" but very little is shared.
It requires special permissions, so I've put my app for review but it was rejected because "I need to show how this information will be used". I would only use this for filtering, so I've shared details and a video of a successful login, but seems like it was not enough.
Any idea?

Google Directory user list from an app

I am creating an iOS app for internal use. We have a Google Domain. As part of the functionality of the app, I want to be able to search for all users in that domain. This can already be done in Gmail, the Apple Mail app, and others.
I found that you can use the Admin SDK for users.list to do exactly what I want to do. I created a Client ID for the iOS app and authorized my app to perform users.list.
However, now I get a permissions error for users who sign in with OAuth2:
I found that you can create a service account to make API requests on your behalf if you delegate it to have the authority. I'm not sure if this is what I want to do since this seems more like something for a secure server to do rather than an app. I'm also not sure how this integrates with a user (from our domain) who signs in with OAuth being able to list our users.
Is it possible to list/search the users in a Google domain purely through OAuth / frontend app?
Aside from caching your own list, I think there are two ways to give users the ability to list all users:
A. Undocumented call to this GAL API:
https://www.google.com/m8/feeds/gal/your-domain-goes-here/full?alt=json (source). You can test this in the Google OAuth Playground by selecting the scope for the Contacts V3 API or using the string https://www.google.com/m8/feeds/.
B. In the Admin console, create an "all users" group. Assign to a newly created Admin Role. Grant the admin role "read" in Privileges > Admin API Privileges > Users > Read (checked).

Is there a unique identifier for a user across different Google APIs?

I am using google's oauth2 to allow users to register/login into my site (php library). The first time a user attempts to login I get the user's email address and google+ id which are provided by the Google OAuth2 API (with the user's permission).
In a different part of the site I need some information from the user's youtube channel. I am using the incremental authorization to get the extra permissions as it is recommended (and described here: https://developers.google.com/identity/protocols/OAuth2WebServer#incrementalAuth ).
The problem is that I don't have a unique identifier for the user between the calls, in order to keep track of him/her in my side of the application. A user, for example might have multiple youtube channels and each one can be associated with a different google+ account/id and a different email address, which most of the time is not a real address but a provided email with the format 'username-XXXX#plus.google.com'.
I was wondering if google's apis can return a unique identifier for the 'parent' account of a user across different apis.
Thanks in advance.

What Twitter access token should I use to automate tweets?

I would like to know what access token I require to achieve the following.
My Meteor app crawls various RSS feeds and makes a daily digest. I would like to automatically tweet about the daily digest when it is created, using the app's Twitter account.
As I see, in the doc, it seems that I need to use application owner access token and create my app using the app's Twitter account. Is this a correct approach?
Yes, that's correct. It's quite simple too.
Go to Twitter Apps and login with your regular twitter account
assuming you have one, if not you need to create one.
Once signed in click on Create New App button.
Fill out the application (Name, description, and whatever else it requires).
Create your key and access tokens. Share those with users that you trust as they'll be used to access the twitter API to read/write information.
Give the application you created a "Read and Write" permission based on what you asked in the question.
Then depending on the software/language you use there's a plenty of existing packages that can help you access and obtain the information from the API.

Using OAuth with Twitter in ASP.NET

I am using Twitter as an OAuth provider for ASP.NET MVC 4 web site. I would like to be able to follow up with a registered user at a later date, either by email or via a tweet. Outside of having the user follow me on Twitter, do I have any other options to communicate with the user?
Here is what I unsuccessfully considered:
It appears that there is no way to get access to the email address since Twitter OAuth API does not return it.
It appears I cannot send a direct message unless a user
follows me on Twitter.
"Read/Write/DirectMessage" permissions seem
too intrusive -- all I want to do is send a user a message that a
new product is released -- I don't need any of the write
capabilities that this level of permissions provides.
To recap, if a user used Twitter to sign in to my website, what are my options to contact that user at a later date?
Thanks.
Twitter's solution for this sort of person-to-person communication is the Direct Message, however, Twitter has (rightfully) decided that both parties need to consent to this channel being available. This decision is intended to reduce the amount of spam in the Twitter ecosystem.
Posting public tweets that mention the username will get your users' attention, but it is also broadcasting their relationship with your company to the entire Twitter ecosystem. You will, essentially, be advertising their relationship with your company without their permission. This approach will bring you headaches sooner or later.
Email is probably a better choice for the sort of announcement to existing customers.

Resources