简体   繁体   中英

Ionic/Angular/JS Create a click event to automate process

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.

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 .

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/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM