Can I somehow get sharedLink without displaying gapi.drive.share.ShareClient() dialog? I just want to make my own Picker dialog to share files.
I've investigated that this dialog connects to external url /sharing/commonshare/
to set shared state and get sharedLinks.
As you see there is "token" prop in POST request. (First picture)
To get it API does another request
I have all data to GET it. But I get 405 Error.
Actually I don't want to try that hard.
Does documentation about it exist? Because I didn't find anything like that.
I just want to share selected file.
Thanks!
You can only get the status "shared": true if you've already shared the drive file before. So if you want get that status just share the file to someone and perform a files.get request. But, I think what you're really after is to get the shareable link. This shareable link used to be alternateLink in Drive V2 but is now webViewLink in V3.
So to get webViewLink (shareable link), perform a files.get and you'll have something that looks like:
"webViewLink": "https://drive.google.com/file/d/abcdefghijklmnopFbVRzT0pkTkk/view?usp=drivesdk"
Note however that this shareable link is viewable only to those who have permission. Use permissions.create to add them. Set 'type' to 'anyone' to share file to everyone.
Also you need to set 'withLink' to true as described in API v2.
Or 'allowFileDiscovery': false in API v3.
So your permissions won't change but file would be shareable by a link.
Related
I used strapi as my backend for all my data flow, I created single-type content, this single type has different components attached to it. After configuring all the single-types, I tried to fetch the data through rest Api, But I didn't got the json data as a response.
This is my json response
This is my single-type structure
So to get back all the data from the "single-type" the following procedure are:
After creating the single-Type content, Go to the settings of the strapi admin page and then click the Role option.
Click on the public tab.
locate permissions tab and search for the single-type you created and click on the single-type tab.
Then you will find the permissions for that single-type, tick on find option, there are other option too, tick it as per your needs.
After that you will see a api endpoint on the right side of the screen for that particular single-type.
Copy that endpoint.
Use your browsers or any api client like Postman etc to test the api endpoint.
Now the Main Trick comes here
To get the result of the end point you have to type something like this:
http://localhost:1337/api/"your single-type name"?populate=*
This above code will list all the components and all its data inside of it will be displayed in the json response.
NOTE:
If there is any image data or any other media files inside the component it won't be displayed, so to to get that also along with other data you need to type:
http://localhost:1337/api/"your single-type name"?populate[your component name which contains that image data][populate]=*
When you type the api endpoint url your single-type name should be without double quotes
Follow this link : For More Information regarding how to handle the rest api in strapi
I'm currently building a Google Data Studio connector where I need to make use of the stepped configuration to achieve dynamic user input.
For example, connecting to Google Analytics will have a configuration of account -> properties -> view.
I want to achieve something exactly of this sort but when a user input the first answer from a dropdown, the connector should make an API request to pull data into the dropdown of the next config.
Please, how do I go about this.
You should be able to get the parameters the user selects from "request.configParams" (in the getConfig function). Using your chosen parameter, you can do an API call to get the data you need so that you can set up your options for the stepped configuration.
Aikau example contains a var button which configured to show popup with form control. As I know every aikau form has a value, which can be used to prepopulate controls, but how to load value from URL?
E.g. someone push on the button, it load "somehow" data from URL, stores them into Form value and then populate one field on the form.
The key problem is what parameters to use as URL (is it publishPayload.url?) and what and where a topic should be set for this?
I have tried already example modification and try to add publishPayload.url and setValueTopic: ALF_CREATE_FORM_DIALOG_REQUEST, but do not see any HTTP requests with URL. If URL was wrong I can see requests with 500 or 404 codes, but even these requests are not send.
Could somebody provide an example how to do this?
Note
It can be just a piece of code for button and cell with value. What is the data or url it does not matter, URL can be a simple link to some NodeRef with title/name property.
As with your last question I would suggest that you work through the Aikau tutorial on GitHub (see https://github.com/Alfresco/Aikau/blob/develop/tutorial/chapters/About.md) I think that you'll find that it has a lot more useful information on Aikau than the official documentation - those examples are taken from old blog posts that were written before Aikau became a standalone project in GitHub. The examples you're looking at a very much out of date and I will try to get them removed from the official documentation.
Aikau works on a publication/subscription model. A button will be configured with a publishTopic and a publishPayload. When clicked the payload will be published on that topic. Services can be provided to subscribe to published topics and provide data.
There are lots of examples of this in both the tutorial previously referenced and in my blog posts on the Alfresco Community platform
I am just very new to Tealium tagging and I want to use the tags whenever an error comes at the loading of a page.
I am using subscribe-publish for showing the error on screen. Now I want to send the error information for analytics purpose everytime an error comes.
Want to send info like error type, page name, site name etc.
Can you please help how to have this implemented using tealium? Please start the explanation from the very basics as I am literally just a beginner :P
Thanks in advance.
First, the asynchronous Tealium script would need to be included on the page.
Create the UDOs for each of the elements you're planning to capture information about (e.g. "error_type", "page_name", "site_name", etc) and consider adding some friendly aliases. These will be the values you need to populate the data layer with when such an error occurs. At this point, assuming you're using the default data layer name of "utag_data", your page will need to have the following JavaScript in the data layer object on the page before the Tealium script is referenced:
utag_data = {
"page_name": "my webpage",
"error_type": "bad request",
"site_name": "my website"
}
Add a tag for the analytics solution you wish to use and set up the appropriate dimensions/variables you wish to store the information within. This usually involves opening the mapping control within the tag, picking the variable you wish to store the information in and mapping it to your UDO that you created previously. Ensure that any analytics-side mapping is done as well since you may need to explicitly define what sort of information you're sending in.
At this point, you just need to save and publish to the environment you're planning to capture the data within (though testing in a staging environment is a good idea too). When you visit the page and there's an error, assuming you did the above, you should see the network request in your browser's developer tools going to the analytics system with the data you provided.
We are creating a website based on images. Those images are uploaded on a facebook page too. I managed to get the albums, the images inside them and the likes that they have through Facebook Graph API. I'm using javascript to fetch all these urls and json to parse all the responses.
We could not found a way to get a like button or create one of our own that could manipulate the likes of each image and change them on facebook too.
I dig through Graph docs, i tried use the social plugin with urls like that https://graph.facebook.com/ but the results from json that fb graph gives ( witch are the true ones checked with the images ) are different from those in social plug in.
I'm not posting any code because i do not thing it is needed. But if someone need more details or code please feel free to ask.
I can use only Javascript for this task server side scripting not allowed.
Sorry for my enlgish, thanks in advance.
Well, if you have a look at the docs at https://developers.facebook.com/docs/plugins/like-button/ you could see that the URLs need to be some "public" URL, i.e. the "link" field of a photo object (as of https://developers.facebook.com/docs/graph-api/reference/photo).