-2

I am making an app that will preform several functions at once, the functions are sending an SMS and posting a message to Facebook and twitter

however, I have hit a wall, I can not find any information on how to automatically post to Facebook and Twitter and send an SMS.

I do not want the user to wait for the SMS messenger APP to open then tap send, then wait for Facebook to open then tap send and then wait for twitter to open and then tap send.

I want to send an SMS and Post to socials all at once. is there any solution or advice for me and where to look.

I am using the IONIC shareSocials Plugin.

Mitchell Yuen
  • 315
  • 3
  • 20
  • Depends on what you want to do. Send a message **from** the users account is harder (or not even possible with Facebook AFAIK) than sending a message **to** the user. – MauriceNino Oct 31 '19 at 13:02
  • I want to send an sms to a list of contacts, and post to facebook and twitter wall – Mitchell Yuen Oct 31 '19 at 13:05
  • Automatically clicking on 'send' won't be possible because it is out of your app's scope..(and would not be secure as well). For "automatic" posting, you should look at API integrations then so that your app can post by just one click for example (if the user authenticated). No option for the SMS part I'm afraid. – Bert Maurau Oct 31 '19 at 13:06
  • @Bert Maurau okay that might work, do you know where I can go and find these documentions? The app does currently sign the user into facebook and twitter – Mitchell Yuen Oct 31 '19 at 13:10
  • @Mitch Added an answer. Since you are already signing in with their accounts, the integration will be a lot simpeler I think then that I described. – Bert Maurau Oct 31 '19 at 13:25

2 Answers2

0

If you will take a close look at those APIs you will see, that they return a page in response. This happens for a safety reason, this way they assure, that your data wasn't stolen. If the credentials are there, you go directly to the "message" view. But it is also another level of control, and posting without user interaction is a policy violation.

There was a way to post something without user interaction with opengraph, but now they are even more cautious about such things. That is also against their policy, which was recently renewed.

Animus
  • 665
  • 12
  • 24
0

The only way would be via API integrations (but still..)

Remark: This would require the whole package..

  • Registering and setting up your app-clients for both FB and Twitter to allow integrating with their API's and allowing users to authenticate;
  • You'll need to implement the user authentication within your app to get their tokens after authenticating;
  • Handeling the auth-tokens in a secure way;
  • ...

Below are the related API sections.

Twitter: https://developer.twitter.com/en/docs/tweets/post-and-engage/overview

Facebook (only allows publishing to pages, not sure if there is still a way to post something to a user's feed): https://developers.facebook.com/docs/graph-api/using-graph-api/#publishing

If you want SMS to be automated as well, you could look at SMS gateway API's, but these are not free (for large amounts) and are sending from a "general" number, not the user's number.

Example: https://gatewayapi.com/

Bert Maurau
  • 979
  • 5
  • 21