Not sure how to ask this question. I have implemented a ConnectInterceptor. However, I don't think it will have the parameters that are in the link sent to a user in their Facebook notifications.
Here is the scenario. A user is logged into our application (Facebook Flash app, iOS app, Android etc. Doesn't matter) The user has connected their Facebook account to their login. Now they go to a page that shows all their friends on Facebook where they can send an invite to that friend to join our app (signup). In that invite that we send to the friend's notifications has the userID (our app) and a gift/productID in the link that will take the user to our app in Facebook where they can join. When they join, it will connect their Facebook account to our app, and at that time we have to give free chips to the user that invited the Facebook Friend (hence the userID in the link) and give any gift to the new user (hence the gift/productID) in the link sent to their notifications.
So I need access to the userID and gift/productID when creating the new user in our app. New user is created in a ConnectionSignUp implementation. But that has execute(Connection) which will definitely not have the user and gift IDs in the call.
Basically, in our app we have players inviting Facebook friends to join the game, and if they do the player inviting will get free chips and the new player might get a gift or free chips, but only when the new player signs up/links their Facebook account in our app.
So I thought an interceptor would be able to get it from the
void postConnect(Connection<T> tConnection, WebRequest webRequest) call.
Will that work, or is there another way to implement this use case that we need.
Thanks
Mark
See comments for answer. Interceptors is the way to go
Related
I've been using the next URL to redirect any user to their private chat with our MS Teams App:
https://teams.microsoft.com/l/chat/0/0?users=28:b9cc7986-dd56-4b57-ab7d-9c4e5288b775
with b9cc7986-dd56-4b57-ab7d-9c4e5288b775 being the App Id of out bot (sample App Id in this case).
This URL will open the private MS Teams Chat with the user clicking the URL and our App on any client (Mobile, Desktop, Browser) without opening any web pages if not needed. The clients can handle the URL themselves. You can try it with this provided sample URL.
What would be a proper way to be able to redirect to a group conversation or thread?
I've thought about using the Conversation Id (or other Ids available in our MS Teams App) or something but couldn't find any good documentation or examples online.
You can use Deep Links to accomplish that, specifically deep linking to a chat. As shown in that link, you can link to specific users, but also set a conversation topic as well as an initial message. One thing that's often overlooked, just fyi, is this sentence:
New chats are created in draft state until the user sends the first message
I want to give users the ability to get notifications via the facebook messenger. However, I don't really know how to get the fb_messenger_user_id from a user.
I can get a personalized ID for the chat if a user starts chatting with my bot, but with this, I can't really verify which user that is. Is there something I've overseen? Something like a button similar to the "login with facebook" button?
Also, as far as I understand the docs, I am only allowed to send messages in a time frame of 24h after the last message from the user.
Can someone tell me how to use the facebook notifications properly?
As a side note: I am planning to implement botman into my existing app. I don't know how much this affects the notifications.
I have some Web Service (for example, Twitter). This service already has users, so every user has account.
I want to provide ability for user to enter something like that in slack:
/tweet "Amazing tweet sent from Slack"
And this tweet should appear at Twitter's page of this user(say, John D. with id=1).
I read something about Slack apps, so highlevel overview is the following:
I need to create a new Slack app
I need to register slash command in this app and provide backend URL which will handle all requests from slack users (like https://twitter.com/slack-integration)
When user enters /tweet "Some tweet", then the following will be sent to https://twitter.com/slack-integration:
user_id=U2147483697&user_name=SlackUser&command=/tweet&text=Some tweet
So, user_id is Slack user id. And now I need a way to link it to John D. with id=1.
Any ideas, what should I do for that?
The docs seem to indicate that once a user authenticates via oauth to an app, the app can post messages on behalf of the user.
What I want to be able to do is post messages as the app. For example the app might search the web for some trending news and than post this trending news into a Yammer group called trending news. However, currently it seems that the app can only post to such as a group as an authenticated user say "john doe". Is there anyway instead that the app can post to this group as user "app-trending news"
Thanks
Messages have to be associated with a user. Therefore you have to create an "app-trending news" user. This is "by design" otherwise machine generated content would drown out user conversations. It's a fine balance but users react negatively to content posted from "bot" users like this, or don't engage with the content they post in.
If you have machine generated updates you can post to the Activity Stream and include a message there.
I am developing a website in which i have a feature of inviting facebook friends, when i invite a friend, he will get a notification on his facebook account,I want the functionality that when he clicks on notification he'll redirected to my website(for eg www.abc.com/signup)
How can i achieve this i am using Graph API, also after clicking on notification he will able to know from whom the invitation has arrived.
How can i redirect user to my website after clicking on notification(with any query string parameters)