Link to open Slack workspace from another Slack workspace in Slack app - redirect

Use Case: I have two Slack workspaces sharing users with the same identity. I want to create a link so that users from one workspace are directed to the other workspace. I want this link to open the other Slack workspace in app (i.e. I do not want this link to open a separate browser).
Solution Attempt: using the Slack documentation on "Deep linking into Slack", I created the following URL:
https://secondSlackWorkpace.slack.com/app_redirect?channel=mainChannelID
However, when clicking this link on a browser, the user ends up stuck on the following page (getting stuck on "Redirecting to #main-channel"):
Looking at the network capture, there seems to be the following error message:
Failed to launch 'slack://channel?team=workspaceID&id=channelID' because the scheme does not have a registered handler.
The experience is worse on the Slack mobile app. After clicking the link, the user gets redirected (in app) to the "Redirecting to #main-channel" page, before that redirection fails and the user goes back to its original:
Is there any other link scheme that I can use to accomplish the use case above?

Related

Whitelisted user cannot open opt-in link

I have published an alpha version of my action quite a while ago. I'm trying to determine the bare minimum to get it visible to testers.
I have whitelisted the one email account I had created for this test.
If I add them and send them the opt in link, it opens a page with the title "null" and says something along the lines of "we can't find what you're looking for..."
If I open the same link as the owner of the action it works fine.
What do I need to do to enable white listed users to access the action on their devices?
The link must be opened on a mobile device that has the Assistant installed. It can't be opened on the web. (The Assistant is the one that actually needs to go to the page - not a browser.)
The approach I usually use is:
In the Assistant, make sure it is set to the account you want to use. I usually go to the "Explore" screen and click my user avatar in the upper right to set it to the right one.
Send the link to the authorization page via email, hangouts, or some other chat.
Open that link by clicking on it. If you're prompted for an app to use to open the link, select Google or Google Assistant.

Google Actions Account Linking Flow

I've written an authorization flow for my action, to do account linking with the "Implicit flow". I have been testing it using the web simulator. When I try to run the action in the web simulator it tells me to link my account, and provides a URL:
"https://assistant.google.com/services/auth/handoffs/auth/start?provider=hello_dev&return_url=https://www.google.com/"
I run that URL and this is what happens:
My Java servlet receives the auth request from google. It contains what is documented, a GOOGLE_CLIENT_ID, a REDIRECT_URI, a STATE and "response_type=token"
I create an access-token from the Google ID that is logged in by using UserServiceFactory.getUserService().getCurrentUser().getUserId()
I craft a URL to the redirect-uri that contains my ACCESS_TOKEN, token_type=bearer, and state= the state string I originally received
I create a web page for the user that contains that link so they can click it and it executes the link and my account is linked.
That works great and the response is a blank page with a URL that says: "https://www.google.com/?result_code=SUCCESS&result_message=Accounts+now+linked."
However, I wanted a flow that allowed the user to ensure they are logged in, and logged into the Google Account they wanted to link
So, I also present a link that logs them out if they'd like. The link is created by using userService.createLogoutURL(thisUrl)
If they do that, I then present them a link to log in, created using userService.createLoginURL(thisUrl)
Once they have logged in, with a different Google ID, they are back on the original page which allows them to log out again or click the "link account" link.
The situation is, that if they click the "link account" link now, the EXACT same link that would have worked successfully before they logged out (except a different ACCESS_TOKEN value) and logged back in with a different account, the response is a blank page with a URL that says: "https://www.google.com/?result_code=FAILURE&result_message=Account+linking+failed"
Two things of note:
If they log out and log back in with the same account, then the "link account" URL works fine
If they are not logged in at all when beginning the process, and then log in and then use the "link account" link it works fine
So, the only time it fails is when they are logged in, log out, log in with a different account, and click to link accounts. That's when it fails.
The account doesn't matter, multiple different accounts work, as long as the browser is logged into the first account and doesn't change during the flow.
I honestly cannot imagine how this is happening.
This gets even worse if I do it in the Google Home app, as it then returns some "malformed request error" page and basically stops working, PERMANENTLY. Stopping/Starting the action didn't help. Stopping/Starting the Web service didn't help. Rebooting the Android device didn't help. Link Account from the Google Home app was permanently broken. The only way I was able to get it working again was to use the Account Link URL (gotten from the web simulator) in the Chrome Browser on my Android device, which seemed to "reset" everything.
At this time, we require that the Google user who initiates the account linking process, both via the simulator and Google Home application, be the same Google user that logs in via a Google Sign-in option, if it is offered as part of your auth flow. This is a hard requirement.
For this reason, we'd suggest not offering a Google logout option as part of your account linking process.

Facebook Wordpress Integration - Publish action

I am using the Official Facebook Plugin to Wordpress, and I am configuring the Social Publisher Settings.
Step 2 is:
Associate an Open Graph action-object pair for your application:
people can publish an article
When I open OpenGraph in the Facebook page, there is no "Publish" Action available, so I clicked on the "+" sign and wrote "Publish" and selected "Article" like step 2 says.
And I get this error when I click on "Create":
A custom Publish action is restricted. Please use the common Publish
action instead.
Where do I find this common Publish action?
How do I resolve this?
Thank you.
You do not need to create it, they are already defined for you. Just start publishing
Common actions do not need to be created, you can just start publishing them. They will then appear in the list of actions in your App Dashboard.
Go to your app settings after publishing and you should see it
https://developers.facebook.com/docs/opengraph/using-actions/

open graph action link not responding

I have used open graph action to publish a story in facebook. I am able to publish and see the story.
Problem is when I click the action link in the story.
I am getting no response when I click the action link in the open graph story posted. I am using sandbox mode for testing the flow and the server to server communication is not happening.

Add to Timeline and Authorization issue

I have created a website where users can download albums after sharing the album on their timeline. The website can be found here at skibsthekid (Music section for issue). The process requires that they "Add to Timeline" and then once authorizing the website to publish what they share, click the DOWNLOAD TO SHARE button which will publish an open graph object and start the download.
This works perfectly from my side and other developers. HOWEVER when a normal user tries this after click the "Add to Timeline" button the pop-up will simply take them to their facebook homepage. My open graph actions have been approved by facebook. Is there another approval process I need to go through or some error. I have tried to find the fault and nothing has come to light. Any help is greatly appreciated.
It sounds like the application was in Sandbox Mode. However, when I tried to replicate the steps you provided above, the action worked for me. See the screenshot below for proof: