Can anyone tell me how can I implement Sending and Receiving direct messages using fabric?
Fabric currently doesn’t allow for sending or receiving DMs through Twitter Kit.
Mike’s correct that Twitter DM functionality isn’t part of the Fabric feature set today, although you can use Twitter Kit to work with the API, it just requires a bit of manual set-up:
- To use the Twitter direct messages API you’ll need to set up a separate set of app keys from https://apps.twitter.com, and select the Read, Write and DMs permission. You’ll then need to update your app configuration file to use the new key and secret instead of the one we generated for you through Fabric.
- Second, when logging in with Twitter you’ll need to explicitly invoke the web browser flow for auth: iOS built-in accounts don’t allow users to grant access to their messages. You can do this by forcing
- With that done, a user can give your app permission to load their DMs, and you can use Twitter Kit to talk to the API as normal.
Hope that helps!
Thanks a lot. I finally got the solution working when I used the Twitter
API key and secret. I was confused between the fabric provided ones and the
Twitter provided ones. Unknowingly i was using the fabric provided API key.
That’s why it was not working. I would also like to ask if there is any
Java bean class to receive the DM API response.