How can I use the name_tags field of the Photo object? - facebook

Uploading a photo, and setting the name (caption) of that photo is no problem, I am trying to tag a name I mention in the caption. According to the documentation, the way to do that is with the name_tags field.
The field is listed in the api-reference, but I can't find the correct way to use it, and there is no example either.
I could find one other question about this here, but it was never answered (he just gave up and used something else).
Does anyone know if the name_tags field is actually there to be used through the api, and if yes, how?

I think you should try to using message_tags field.

Related

How to query the iTunes API for movies in a specific genre

I am trying to query the iTunes API for movies in a specific genre. I have been searching for hours now but can't seem to figure it out.
Example: https://itunes.apple.com/search?term=james+cameron&limit=25&entity=movie
This will give me a list of movies made by James Cameron, but I wan't to search for all the movies that match a specific genre, ex: "Romance".
When I look at the documentation here: https://affiliate.itunes.apple.com/resources/documentation/itunes-store-web-service-search-api/
It states that I can search for attribute=genreIndex, but I can't find anywhere this 'genreIndex' is specified. So I have no idea what to put in here? - I found several other questions relating to the same, and they all link to this: https://affiliate.itunes.apple.com/resources/documentation/genre-mapping.html
Which no longer exists?
Is there something I don't understand, or how am I supposed to do this?
Thanks! :)
This solutions is not in the iTunes documentation, I found it by trying around. (I think that 'genreIndex' might be deprecated, and is now 'genreTerm' (Maybe Apple forgot to update it on the documentation). However, this works perfectly:
https://itunes.apple.com/search?term=romance&entity=movie&attribute=genreTerm

No release date for GET /artist/[id]/albums?

In the context of showing all albums of a given artist, as returned by e.g.
http://api.deezer.com/artist/13/albums,
..I would assume it's a pretty common use case to want to sort the albums in discographical order (i.e. by release date) for display.
Yet, I haven't found a way to do that, as the release_date property seems to only be available when requesting a single album, and I haven't found a way to affect the sort order in the response.
Am I missing something?
Any help with this is much appreciated! Thx.
I don't think there is a possiblity to do this straight forward at the moment, maybe you can file a request at Deezer's side.
You can get a list of all albums for an artist, open the details for each album individually (album/albumid), add them to a list which you can then sort on release date.
Seems like a bit of a hassle for something that will probably be a quick job on Deezer's side, but if you really need it, that's the way at the moment.
We just added the release_date property on the endpoint /artist/[id]/albums.
Jimmy

Set id and name in typo3 powermail form

I am kinda new to typo3 and after 3h of looking for an answer I resign and hope someone of you can help me. So what I am trying to achieve is a hidden field in a powermail form with a certain id and name. I can add a hidden field in the backend but there is no option to set an id nor name. I guess it is somehow possible to do this with some typoscript but I couldn't find a way in the docs. The closest thing I read is this https://docs.typo3.org/typo3cms/extensions/powermail/ForDevelopers/AddNewFieldProperties/Index.html but this let me create a whole new template for a field as I understood. This is way too much as I only need to set the id and name for one field only.
I hope someone can help me. Thanks in advance!
If you want to add a field with a complete own name for some reasons, you could add a field of type HTML and add your input field as you want (see https://docs.typo3.org/typo3cms/extensions/powermail/ForEditors/AddANewForm/FieldHtml/Index.html). Of course powermail ignores this field in the createAction().
BTW: You wrote something about google. Are you sure google can handle fields in POST-requests? If not, you have to add the value as GET value in powermail. That must be done in the Form HTML-Partial.

Custom placeholders in user story

I am trying to publish user stories on a facebook user's wall using graph api.
My use case is like this:
the user wrote an article that regards a specific community
I created one action 'writes' and two objects 'article' and 'community'.
The two objects have each their pages on my website, where I created all the corresponding meta data for open graph. Tested with the Open Graph Object Debugger and it looks fine.
Now I wanted to customize the way the story is shown.
The default sentence is for example
"[user] wrote [article.noun] via [appname]"
(brackets are there just to identify placeholders)
but I would like to include information about the community.
So what I did is add a property to the write action, called community that expects a reference to a community object.
Then I changed the sentence to:
"[user] wrote [article.noun] on community.title via [appname]"
via triboom demo"
but community.title is just treated as plain text and not as a placeholder.
Is there a way to tell FB to use the property value in the sentence?
I could not find any documentation on this.
TIA
s
Ok, just found out you need to use {object.property} syntax (doc is here https://developers.facebook.com/docs/opengraph/creating-custom-stories#variations)
Will investigate more and update the answer if it works.
Thank you very much for posting that!
How can the placeholders be referenced if there are more than one objects in the sentence? Like, for example, in the "One to Two" sentence:
"[user] wrote [article1.noun] and [article2.noun] on community.title via [appname]"
Please excuse for posting this as an answer. Unfortunately, I lack the reputation to comment.

Missing timestamps for uploaded images

I have mongoid and carrierwave-mongoid gems in my project (for avatars in user model) and need timestamps in uploaded images URL. I know there is Wiki page for this (https://github.com/jnicklas/carrierwave/wiki/How-to%3A-Use-a-timestamp-in-file-names) but there is note "This does not seem to be reliable. I'd strongly recommend saving the timestamp to the database and reading it from the model to generate the filename instead of using this method." and I'm not sure how to do that.
I think Rails should generate timestamps for images URL automatically or from specific attribute right? So I'm not sure what is the right name for this attribute or what is the right approach for this with Mongoid and carrierwave-mongoid.
Could you please provide me some info or link where I can found more about this or info about the solution.
Because my repo on GitHub is private I did this Gist (https://gist.github.com/2355128) where you can see my user model and avatar uploader.
Thanks for your help.
This may be more generic than you want for an answer, but hopefully it will get you to an appropriate solution. The unique ObjectID that is used for the default _id fields in MongoDB has a timestamp "built in", BSON::ObjectId would be what you are looking for in Mongoid to extract it.
There is also a write up on it here:
http://www.mongodb.org/display/DOCS/Optimizing+Object+IDs#OptimizingObjectIDs-Extractinsertiontimesfromidratherthanhavingaseparatetimestampfield.
Hence, you could use a wrapper around the ObjectID to construct your URLs and avoid the use of an extra timestamp entirely.