Slack - Executing code (client) on click of Slack Message Title - slack-api

I have Slack message posted using postMessage & Attachment. It has Title and Title Link which opens the External URL. I wanted to capture the link click event when User click on it. Is it possible to wire click event and handle it?

No. The Slack API does not provide any means to "capture" the click event and do anything else then open an external link in the browser.

Related

Keep textarea active after message is sent

I'm creating a chat application with Angular and I got stuck on the following case:
When a user sent a message he has to click the chat area (it is a textarea) again to send a new message.
How can I keep the textarea active when a message is sent and the client to be able to write instantly after that without click the textarea again?
I tried to simulate a click (el.click()) on the textarea after the message is sent but it doesn't help. I tried also with el.focus().
If anyone else stuck on a similar case here is the solution:
el.focus()
should be done in
ngAfterViewInit()

Launch App from eMail with URL-Sheme

Hello I have a custom URL to open an app with a link. It works in the browser. But I want to send an email that another user can click the link in the email and the app will be started. Does anybody know a solution?
It is not possible to send an email with the link (myApp://). It always shows the the link as blank text.
Or does anyone know another solution to transfer data between an app to a other users app?
I think you need to write the link in href html tag
i.e. open my app
another solution is to try to add any text after the double slash i.e. myApp://open

MFMessageComposeViewController substitute full URL link inside SMS body with "clickable" text

Inside the app I have a MFMessageComposeViewController presented with pre-defined text. Inside this text I have a link, for example: "Hey, visit this site https://stackoverflow.com/"
In HTML we can do next:
site
And it will make "site" clickable. Is there any way to do inside the app, so that recipient will receive iMessage with text link, instead of full https://stackoverflow.com/ ?
SMS does not support HTML or URLs, just plain text.
All you can do is just add the URL to message and then it's up to the Message app to recognise the URL and allow the user to click on it.

how to stop to show Remember Password

I make Application with webview to my Application. when i want to Login some pages and i want to login saites the confirm Message is displayed.and it says that do you want the browser to remember this password. I don't want to show this Message and i dont want to click on never
what should I do to stop showing this Message and what should i do to Not displayed this Message
you can see the see screenshot
http://i.stack.imgur.com/1kulj.jpg
You can turn this behavior off with the WebSettings.setSavePassword() API. Please see http://developer.android.com/reference/android/webkit/WebSettings.html#setSavePassword(boolean)

Prefilled data in facebook web dialog

Is there any way i can prefill any string in FBWebDialog? Any workaround would do,I am aware facebook has deprecated the message parameter from their sdk.
My scenario is user clicks on a facebook contact
FBWebDialog opens and then the message gets prefilled with some text instead of a blank textfield.
any help would be appreciated
Thanks
Okay, from the comments it sounds like you want to post on the user's wall. Here is a method that is available in the FB SDK that pulls up a share dialog within your app and supports pre filled text
[FBDialogs presentOSIntegratedShareDialogModallyFrom:self initialText:#"Initial text" image:nil url:nil handler:nil];
Example with pre filled text:
Which type of dialog are you opening? (Sounds like the Send dialog, if you want to send a Facebook message.)
I do not think it is possible to even send a message directly to a user from iOS. When performing the following I get the error "This dialog is not available on this device"
[FBWebDialogs presentDialogModallyWithSession:nil dialog:#"send" parameters ...
iOS FB SDK WebDialog reference shows the following methods:
+ presentRequestsDialogModallyWithSession:message:title:parameters:handler:
+ presentRequestsDialogModallyWithSession:message:title:parameters:handler:friendCache:
Those seem to support pre-populating the message field. They only support apprequests though (not messages) and whether the message is even attached is a bit unknown (all I saw when testing was "User wants you to try App", not the actual string I set).
The javascript API (which could maybe be pulled up in a webview?) doesn't have a parameter to set the message probably because the Send dialog documentation says:
Facebook messages are a channel for person-to-person communication,
and not for apps to send messages, or encourage people to spam their
friends.
If you just want to post a message/share then you can use a share sheet which looks to support an initial message:
[FBNativeDialogs presentShareDialogModallyFrom:self initialText:#"My text to share" ...

Resources