# Twitter sign in

You need to create a twitter app, on twitter to use this authentication method.

[Can I use Firebase simple login to access Twitter API?](https://stackoverflow.com/questions/16072282/can-i-use-firebase-simple-login-to-access-twitter-api)

> The Firebase Simple Login JavaScript client now returns both the Twitter access token and access token secret in the response payload from Twitter authentication.
>
> You can access each of these via the user object, under the attributes accessToken and accessTokenSecret as shown below:

```javascript
var firebaseRef = new Firebase('https://<MY-FIREBASE-NAME>.firebaseIO.com');
var authClient = new FirebaseAuthClient(firebaseRef, function(error, user) {
  if (user) {
    var accessToken = user.accessToken,
        accessTokenSecret = user.accessTokenSecret;
  }
});

...

// Sample jQuery click event.
$myButton.on('click', function(event) {
  authClient.login('twitter');
});
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://textav.gitbook.io/firebase-react-notes/auth/twitter-sign-in.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
