Twitter Direct Message showing app as sender - twitter

Is it possible to send a direct message with Twitter api and make the app name appear as sender?
I can send the direct message using the "Access token" and "Access token secret" that is in the "OAuth tool", but these messages are sent from my own Twitter account (the one that I used to create the app).

No, Twitter's documentation for new direct messages here says that the api:
Sends a new direct message to the specified user from the authenticating user
so the app must send the direct message from a user and not from the app (the info box on the right of the docs says "requires user context").
The only way to make your app appear as sender would be to create a Twitter account with the app name but the user that receives this message would have to follow your app first to be able to receive the message.

Related

Getting "FacebookAds::ClientError (Invalid parameter: Terms of Service Not Accepted (fbtrace_id: Ch/RdwGB+D3))" after i call api to create App

I will explain the scenarios here
1) When user click on link facebook button facebook permission dialog is bypassed and returns back directly on redirect uri(http://localhost:3000/ in my case) with code and state.
2) I am successfully able to exchange the code return above with access token.
3) I used facebooks access token debugger to analyze the token above and shows be proper scopes i need.
4) After this i fetch ad_accounts id, page token and page ids using this token.
5) when i use this token to create campaign for ads i get the following error.
FacebookAds::ClientError (Invalid parameter: Terms of Service Not Accepted (fbtrace_id: Ch/RdwGB+D3))
I use ruby facebook-business-sdk.
My app is in development mode and not live yet.
I can see both facebook login and marketing api green live in my app dashboard.
It makes sense to me that i am getting "Terms not accepted error" as user is never prompted to permissions dialog to permit my app for token.
I also observed that if add scope params to facebook login uri, the user is prompted to permission dialog.
I must be missing some configuration here, i have not yet submitted my app for review.
Any help/clue is appreciated.

Firebase Email verification with SMS like Code

It is possible to use email verification with firebase but instead of sending a link they have to click, it should send a code like a sms verification code and i have to check in my ios app (swift based) if they match.
Email verification ensures that the user has access to the email address they claim. Setting an email address to verified by sending a text message is not the same, as you can't know from the receipt of the text message that they have access to the email address.
But as A. Welch commented, you can verify that the user has access to a specific phone number by using Firebase's phone number authentication as documented here: https://firebase.google.com/docs/auth/ios/phone-auth
If neither of those does precisely what you want, you can also roll your own. Send a text message or email with whatever information you want, and use the Firebase Admin SDK to update the user profile.

Automatically sending an activation key by SMS or email after registration

I'm working on a free iOS app; at the end of the registration (when the user has registered a good phone number and good email address) I want the user to enter a code which he has received on his phone or email.
But the problem is how to send automatically a SMS or an e-mail programmatically that contains the code?
I don't want the user to be redirected to a specific view controller to compose a message by himself (like with MFMessageComposeViewController or MFEmailComposeViewController)
just and only just the same appearance of SMS or email sent to users but with a different activation key (for the keys, I think about auto generated keys stored in a database).
And I think about the same way for forgotten identifiers, the user enter his email address or his phone number in a text field, and a message is automatically sent with the password and the username of the user, if the email address or the phone number entered is already existing in the database, if it is not, it shows an alert view with an error.
Does anyone have an idea for how to do this?
You can use the following services Parse.com + mailgun. Search on Parse.com for a tutorial using mailgun and it should accomplish what you are trying to do. On a side not, be careful when creating an app which does not allow the user to use it until they enter some access code, it is against the Apple rules and could lead to rejection.
I assume you have a server that generates this activation code that is sent to the user.
When the user enters the text field with the code he got it should be sent back to the server with an http request (use NSURLConnection ). The server should response to the http request with approval or error whether the code is right, or send the username and password and any other data the user needs to continue.

How to get receiver name or user_id on sharing a message through Facebook Messenger

I referred this link for sending a message through facebook messenger.
https://developers.facebook.com/docs/ios/share#message-dialog
Is there any possibilities to get the user name to whom we send? Suppose I login & while sending the message to some XXX is it possible to get the name XXX? I found many tutorials but I didn't find any solutions.
I want to send a message and not notifications.
So I finally understood that there is no such possibilities. Now coming on to request when sending from facebook is it possible to save the user name to whom we send?

Twitter API: Log in Issue

I am trying to log in to my twitter account through the developer's section. But instead I get this error message
"sorry, we couldn't log you in with this twitter account. Double check your credentials and be sure your email address is confirmed".
I was able to log in to my normal twitter account..Can anyone help me with this ?I noticed Twitter API 1.0 has been deprecated.So I am trying to upgrade to API 1.1.
Go to https://twitter.com/account/resend_password, type in your email address, and click the submit button. You will receive an email that tells you what to do. Follow the directions in the email.

Resources