Azure DevOps Boards - create button to switch tab - azure-devops

I'm developing application for Azure DevOps Boards and got stuck on how to create 'link' to the different tab on Work item page? Specifically I have a hub on details page and want to add link to the different tab with details. So I already have plugin which adds hub and tab and I want to add kind of Show Details button to switch from hub to the tab. But I can't find any way how it can be achieved. Looks like tabs do not have own urls which can be used. So it must be some js call.

Azure DevOps Boards - create button to switch tab
Yes, I agree with you. The tab should be the js call.
If we want to add a Show Details button to switch from hub to the tab, we need get the url for the tab, so that we could add it in the properties:
"contributions": [
{
...
],
"properties": {
...
"uri": "URLHere"
}
}
]
However, if we switch between these existing tabs, we will find that the URL in the browser has not changed. So, those tab should not be the URL type. We could not get the URL for those URL.
Besides, if we check the source code of this webpage, we could also to know those tabs are not URL call.
Hope this helps.

Related

Can You Link to Google Assistant Action from a Web App

Can you link to Google Assistant to open it up or even better open up a Google Action from a web app? I know you can link to a Google Action page but you can't seem to link right to the action actually in the assistant.
Yes, you can setup a link directly to an Action. In the Action Console, you can generate a link and then use this link on a web page. To create the link
From the Action Console, select "Actions" on the left menu and then the right arrow for the Action you want to make a link for
In the "Links" section header, select the down arrow to expand it
Once expanded, turn "Would you like to enable a URL for this Action" on and provide a brief description of what your action does when this URL is followed (for example, "start" or "purchase tickets"). You'll then see the URL in an HTML snipped underneath. Make sure to click the "Save" button to save this.

Make google actions development project preview persist longer

I want to make google voice actions app for my Google Home. But, based on quick research, as of Dec 11, google does not allow private projects for Google Home.
References:
Can I develop a private action only accessible via my google home or linked account?
How can I run my development action on my Google Home?
I understand that I can preview the app from API.ai project, and it deployes to the linked Google Home device.
But the issue is, the deployed app does not persist. It is no longer available after hour or so.
How can I make it permanent (if there is a way)?
UPDATE
Based on Leon's answer, I just wanted to extend the steps on how to enable the sample for 24 hours.
Click on the "Google Home Web Simulator" link on bottom right corner.
Then you will be presented with google home device - click on "Start" button on that page
On next page, top right corner you have the "ACTION PACKAGE" button Leon is talking about. Click on that and extend expiration time by clicking on "Preview for 24 hours" button. See screenshot below:
I have found a way to create the Action on API.ai and then preview it indefinitely.
From API.ai:
Open browser dev console (Network tab)
Go to Integrations
Turn on "Actions on Google" integration
Click "Authorize"
Click "Preview"
Inspect the XHR response from https://console.api.ai/api/agent/googleassistant/preview in the Network dev console
{
"status":{
"code":401,
"errorType":"unauthorized",
"errorDetails":"You are not authorized for this operation. ",
"webhookTimedOut":false
}
}
Copy/paste the content of the response into a file called action.json
Then, download and install the gactions CLI from here - gactions CLI and then run this command:
gactions preview --action_package action.json --preview_mins 9999999 \
--invocation_name [your_own_invocation_name_here]
The preview_mins value of 9999999 makes the preview effectively indefinite.
Here is a video demonstrating it:
As of today, May 17 2017, the highest voted answer to this question no longer works for new API.ai projects due to the upgrading of the Actions on Google SDK to v2. A similar methodology to #Brady's answer does work still, but they've made it more difficult in some ways (more information needs to be provided to Google, globally unique invocation name despite being a local only test), and better in others (gactions CLI docs now explicitly state that indefinitely timed previews are accepted, and actually is the default if not provided as a argument to the gactions test call).
Create your API.ai agent as normal.
Under the "Integrations" side menu, open the "Actions on Google" settings.
Select "Test" from the bottom of the dialog box that appears (you may need to jump through a few hoops here, signing in, authorizing account access, etc.)
This is where it gets a little different. You now need to create a project on the Actions on Google console. Create or import a project to the console.
The first required step is to supply an action package, which can come from either API.ai or the SDK directly. For API.ai, you have to go back to the Integrations page we were at and press "Update" on your Actions on Google settings. (On the previous version of the SDK, this was labeled "Deploy" and would have made your app public, but don't worry - all this does now is update the AoG console. You publish publicly from the AoG console later if desired).
This new console requires more information outright than was necessary before. I found that the "Assistant app name" can be whatever you want, but the "Pronunciation" is strictly limited to a few conditions (globally unique, reserved keywords, non-brand violating). I also found that I could still invoke using the app name and not just the pronunciation, but I suspect that will be fixed.
Once you've filled out all the necessary information, you can test
from API.ai. Return to the AoG settings menu in API.ai and retrieve
the response content from the HTTP request preview (just like in
#Brady's answer above). Here we hit another difference. The content
of the request response can't be used directly in the action.json
file as it is wrapped in another object. You want to use only the
object from the property actionPackage. (i.e. remove
{
"actionPackage":
from the beginning of the content and
}
from the end). You should end up with a object of a structure similar
to this (but maybe not exactly, it depends on the content of your
API.ai agent):
{
"actions": [...],
"types": [...],
"manifest": {...},
"conversations": {...}
}
Put this into your action.json file.
Execute the new gactions CLI command:
gactions test --project <your_project_name_from_aog_console> --action-package action.json
Enjoy your local v2 Actions on Google SDK project! And pray Google does not alter the deal any further...
I tried my best to recall what I had to do from memory, so there may be some mistakes in this write up. Hopefully this helps someone.
You can extend the time the development action can be previewed on the web simulator or Google Home device. After you preview the action from API.AI, click on the list of action packages in the web simulator. Then select the "Preview for 24 hours" link for your action package.

Can't add page tab to Facebook page - get no prompt to add page

I relate to this well known Page Tab Tutorial by FB: https://developers.facebook.com/docs/appsonfacebook/pagetabs.
The third step, after filling of page tab info and adjusting of the tab width is getting a prompt to select a page, to which the newly created tab will be added. But i don't get this promt, like it's written in the tutorial and seems to be the normal case for all users.
After i edit tab details and press "save changes", the page reloads with "saved"-message, like on this screenshot,
and i see no further given possibility to add created app to any of my pages. If i go into the administration area of any of my pages, in the tab "apps" is this newly created app not present, so i can't add it from there too. What i'm doing wrong? The solution must be simple - i go crazy:( I tried it with Firefox and Chrome, setted off all popup- and adblockers - nothing goes...
Thanks for ideas and advice!
Evgeniy
The "manual solution" to this problem has changed. While logged into facebook, visit this link in your browser:
https://www.facebook.com/dialog/pagetab?app_id=YOUR_APP_ID&redirect_uri=YOUR_URL
There are two parts of this link you must change before it will function.
YOUR_APP_ID: Find this in your app settings or app dashboard URL. It's a long number, 16+ digits.
YOUR_URL: Use the URL of the content your new tab page will call, ie "Tab Page URL" as entered in your app settings.
This newly modified URL will load a page with a dialog where you can choose which of your Facebook Pages to add the tab to.
These instructions appear here but they are far from clear. Good luck!
For anybody who will look for solution:
to add a page tab to any page do it manually: edit a link
http://www.facebook.com/dialog/pagetab?app_id=HERE-COMES-APPID-OF-YOUR-PAGE-TAB-APP&redirect_uri=http://www.facebook.com
fill into the link the app id of your newly created page tab and run this link in your brwoser: you will get a site with the prompt from the first image i cited in the first post. There you will be able to select one or, with pressing SHIFT, many pages to add your app/page tab.
You must choose "PAGE TAB" in the dialog ! ! !
see the TUTORIAL here: https://stackoverflow.com/a/35287477/2377343

How to add tab application to a page with the "new auth dialog"

I created an app today, as i've done several times before. But when i wanted to add the app to a a page i couldn't find the link "view this apps profile page", which I normally use to add the app to my pages.
Anyone know how to add apps to a page, with the new "auth dialog" thing ?? I can't find a link to the apps profile page.
You can do it in several ways:
Using Add Page Tab Dialog as described in documentation:
With JavaScript not even leaving page where this get called FB.ui({method: 'pagetab'});
By redirecting to https://facebook.com/dialog/pagetab?app_id=APP_ID&redirect_url=URL
Via link http://facebook.com/add.php?api_key=APP_KEY&pages=1&page=PAGE_ID
From Application Profile page (you can easily get to it via http://www.facebook.com/apps/application.php?id=APP_ID or via shorthand http://facebook.com/APP_ID or by clicking on Application Name in the left bottom corned of every page while visiting Application Canvas)
(note that newly created apps don't have an Application Profile page - as discussed on the Developer Blog )
Using the API directly with a manage_pages access token - details in the Page documentation.
I have found this to work the best:
http://www.facebook.com/dialog/pagetab?app_id=YOUR_APP_ID&redirect_uri=http://www.facebook.com
Tried all of above. The only one that worked for me was this one:
https://www.facebook.com/add.php?api_key=YOUR_API_KEY&pages=1
YOU SHOULD CHOOSE "ADD PAGE TAB" in "ADD PLATFORM" DIALOG!!
1) Enter https://developers.facebook.com/apps/ and choose (or create) desired app.
2) do this from settings:
3) then enter:
- https://facebook.com/dialog/pagetab?app_id=APP_ID&redirect_url=https://yoursite.com
or
- http://facebook.com/add.php?api_key=APP_KEY&pages=1&page=PAGE_ID

Facebook "Add to My Page" not there

I've made some facebook pages before, but I'm running in to a problem that I haven't had before. Usually, when someone asks me to dev a facebook page for them, it's linked to an account and all I have to do is add the developer app, make a few apps for the links on the side bar, then navigate to the apps I created and click 'add to my page'.
For some reason, this person today gave me their log-in and their account isn't really 'real' so-to-speak. I'm navigated to the page they created upon log-in and there is nothing else loaded, not even a search bar. I was able to add the developer app by navigating to Edit Info (search bar popped up). However I am unable to add any apps to this account. The 'Add to My Page' does not show up on any app pages I navigate to. Is this because the account doesn't really exist? There is a "Create Your Profile" link up near the Settings/Logout buttons.
Am I thinking about this wrong? Is there another way for me to add apps/sidebar tabs with an account like this?
I was thinking of telling the person to register the account fully since "If you create a profile for your business, your account may be disabled for violating our Terms of Use."
Let me know if any of you have any insight.
Thanks!
facebook changes as usual
try my "fix" # http://admine.eu/addapp.html
here is part of the source and actually all you need:
window.open(
"http://www.facebook.com/dialog/pagetab?app_id=" +
document.getElementById("appid").value +
"&next=" +
document.getElementById("appurl").value,
"PageTab","width=1000,height=300"
)
+document.getElementById("appid") is the id of your app
+document.getElementById("appurl") is the canvas or tab URL of your app
I run into this too. Sometimes as when a client adds me as an admin I have to like the app I made on its profile page then switch to page mode and go to edit the page>apps and it shows up in my list of apps.
If you have already added it once it may already be in that list as well but doesn't show up in the left navigation until you add it as a tab in the app settings while in Page mode.
I find that if there are more than 8 tabs in the navigation already FB won't automatically add it to the left nav.
-Ann
I've put together a javascript snippet that is intended to be used as a bookmarklet. If you use the bookmarklet while on an application's page in the developers section, a new window will automatically open with the add to page-dialog. To use it, just copy the minified code from the repository below and create a new bookmark for "javascript:[the code]" (without the quotation marks).
https://github.com/Wehrzie/Add-Facebook-Application-to-Page-Bookmarklet
Hopefully this will help some until Facebook cleans up their current, quite messy, solution.
Simple to use:
http://www.facebook.com/dialog/pagetab?app_id=APP_ID&next=http://www.facebook.com
More info about what's going on:
https://developers.facebook.com/blog/post/2012/02/01/how-to--migrate-your-app-profile-page/