Unresolved error with validating logo for organization in JSON-LD markup: "A value for the 'url' field is required." - schema.org

I'm trying to validate my JSON-LD markup, but Google's structured data tool is keep giving me error for Organization logo. I think it's a bug since it says I need to add URL.
https://example.com/ (A value for the url field is required.)
Google's tool: https://search.google.com/structured-data/testing-tool/u/0/
My script:
{
"#context":"http:\/\/schema.org",
"#type":"Article",
"name":"Test",
"image":"https:\/\/example.com\/favicon.ico",
"url":"https:\/\/example.com\/",
"author":{
"#type":"Person",
"name":"Admin"
},
"publisher":{
"#type":"Organization",
"name":"Orals",
"logo":"https:\/\/example.com\/favicon.ico"
},
"headline":"Welcome everyone!",
"datePublished":"2019-10-06",
"dateModified":"2019-10-06",
"articleBody":"Hi"
}
You can copy paste the above script into the tool's textarea.
I've been reading the official documentation and AFAIK I'm doing everything right. Here are a few related docs: Organization, logo

It’s a valid use of Schema.org. Google’s SDTT, however, is not a general Schema.org validator. The warnings and errors it reports are primarily about Google’s own search result features, which require the use of specific Schema.org terms in specific contexts.
For the AMP version of Google’s Article rich result, Google requires the publisher property, and the publisher’s logo has to have an ImageObject value instead of a URL value.
"publisher":{
"#type":"Organization",
"name":"Orals",
"logo": {
"#type": "ImageObject",
"url": "/logo.png"
}
},
If you don’t want this Article rich result in Google Search, or if you don’t use AMP, or if you can’t get it for other reasons (e.g., because you can’t provide all required properties), you can safely ignore this error in the SDTT.

I would only add the following information to the excellent answer of unor.
In the guide of Google for Logo has the following Google requirements for logo properties:
Images must be in .jpg, .png, or. gif format.
The format you specified for your logo is "logo":"https:\/\/example.com\/favicon.ico"
It can be assumed that Google ignores this format.

Related

Is there a way to simply follow a URL in the Caroussel Selector?

I am trying to figure out how I can embed Google Actions responses, such as the cards carousel, in a webhook response for DialogFlow.
According to the documentation, the structure looks as following:
"carouselSelect": {
"items": [
{
"optionInfo": {
"key": "MATH_AND_PRIME",
"synonyms": [
"math",
"math and prime",
"prime numbers",
"prime"
]
},
"title": "Math & prime numbers",
"description": "42 is an abundant number because the sum of its proper divisors 54 is greater...",
"image": {
"url": "http://example.com/math_and_prime.jpg",
"accessibilityText": "Math & prime numbers"
}
}
Is there a way to let the device simply follow a link when a certain card is clicked?
In the documentation, there is a paragraph Handling selected item, but this does not really answer my question. In my case, I am showing the cards from a DialogFlow conversation as explained in How can I integrate the Google Actions responses in a webhook response in Dialogflow?, so I am not following the Google Actions SDK flow as explained in these docs.
Also as a side note, if I am understanding this paragraph correctly, the backend service is called with a certain selected item. In my scenario, I don't need this information in the backend, I would rather want the device to just follow the URL.
In short - not directly, no. (Update: Yes. See below.)
You're mixing terminology, which may be causing some confusion. The Actions on Google defines a few different GUI components which have different capabilities:
Options to advance the conversation can be presented as List or Carousel items. Both of these allow an image and some text (think around a sentence or two). The selection option is sent back to your Action with the intention that the user will select one to continue the conversation. It is not meant to be the result of the conversation.
You can also show a single Card which also contains an image and some text. Unlike the Options, however, you can only display a single card, and it can contain a URL that links elsewhere. Cards are intended to be the result of a conversation.
There are also Suggestion Chips which are a word or two and are intended to supplement the above options to change the direction of the conversation.
Finally, there is a Link-out Chip which is a chip with a URL.
The best you can do at this point is to present the user with the options available and, once they reply, present a card with a link out directly on the card, or prompt them if this is what they wanted and offer a suggestion chip saying "no" that goes back into the conversation or a link out chip to the destination that the card represents.
Update: Google has just added the ability to create a Browsing Carousel, which allows you to create something that looks like a carousel, but only has links. The Browsing Carousel is defined differently (it is part of a RichResponse rather than a possible Intent), but the two look very similar.

Why does an HTTP header sent to my Smart Home webhook indicate API version v1, when I am using v2?

Our project was created after May 2017, therefore we believe it is using the v2 Google Assistant API, in accordance with what the documentation says here.
However, the 'Google-Assistant-API-Version' header in HTTP requests sent to our webhook contains the value 'v1'.
Google-Assistant-API-Version: v1
All the content is using camelCase, rather than snake_case, however, so it does appear to be using v2. As far as we can tell, we are also responding using the v2 format, and this works fine.
We also include the 'Google-Assistant-API-Version' header in our responses with the value 'v2'. For testing purposes we have both removed this header entirely and changed its value to 'v1'. In both cases, the skill continues to function normally.
I have also attempted to change my action package to include the 'fulfillmentApiVersion' field (as described here), but it doesn't appear to have any effect.
{
"actions": [{
"name": "actions.devices",
"deviceControl": {},
"fulfillment": {
"conversationName": "automation"
}
}
],
"conversations": {
"automation": {
"name": "automation",
"url": "https://**************************",
"fulfillmentApiVersion": 2
}
}
}
While we are not experiencing any problems at this time, we wonder if this is a sign of some dormant error, and were wondering if anyone could offer some clarification?
The Google Assistant API version may be incorrect, or it may be referring to the API version for Smart Home. The Smart Home APIs launched publicly around May and use a different protocol for the data returned from the webhook.
If you are building a Smart Home application, please refer to the documentation above on how to write your webhook responses.

Facebook Ads API: How can I create ads preview without create campaign first?

I check a lot of documents, and flow like that:
Submit data to create Campaign, target, and AdCreative
Use ID of AdCreative to generate preview code
Display preview code to my site (to show to my user)
But I don't want to create Campaign, Targeting, and AdCreative before preview, just submit raw data of AdCreative to get preview code.
I found that doc https://developers.facebook.com/docs/graph-api/reference/generatepreviews/, and look like they can solve my problem... But it didn't work.
My test data is: https://graph.facebook.com/v2.6/generatepreviews?ad_format=RIGHT_COLUMN_STANDARD&creative={"object_story_spec":{"link_data":{"message":"msg","link":"http://kimkha.com?1","caption":"ccccc"}},"name":"NAME 1","body":"dddddd","title":"titititit","call_to_action_type":"OPEN_LINK","object_url":"http://kimkha.com"}&access_token=<token>
And the error:
{
"error": {
"message": "(#275) Cannot determine the target object for this request. Currently supported objects include ad account, business account and associated objects.",
"type": "OAuthException",
"code": 275,
"fbtrace_id": "GeckbxpU9gr"
}
}
I ran into the same problem and got past it, despite not being able to get a fully-functioning dynamic preview working. Here are some more pointers to help save others the pain.
The url needs to include an "ad account, business account or associated objects" like the error message states. For my case I used my ad account id (https://www.facebook.com/business/help/1492627900875762). The url changed to be the following base format: https://graph.facebook.com/v2.10/act_<your-app-id>/generatepreviews
When you get the response, you need to decode the body and you can use the url directly to test. I replaced \/ with /, & with & and removed the trailing slash. After this you get a url that should give you more specific error messages
I had to also specify a "page_id" parameter that the ad will be associated with. This is a sibling of "link_data" in the sample JSON listed above.
You may get error messages telling you to change the format of certain fields.
Eventually I got the error "Preview Not Available: Unable to display a preview of this ad. (fbtrace_id: Dsfql/z/qVI)" and finally lost the will to continue. The documentation is far from easy to follow and does not have clear examples.
I'm sorry I can't give a working solution, but for my case I was evaluating this API for a non-critical piece of work and timeboxing prevented me from proceeding. Hopefully I help save some time for someone else.
I ran into this problem. The solution for me was to use my app token instead of the Graph API Explorer's token. Hope this helps!
My two cents after struggling on this issue. My request had to be formatted as follows (this is using video data, but should extend to link data):
act_{ACT_ID}/generatepreviews
?ad_format=DESKTOP_FEED_STANDARD
&creative={object_story_spec:{
page_id:<PAGE_ID>,
video_data: {
image_url: <IMAGE_URL>,
call_to_action:{
type:"SHOP_NOW",
value:{
link: <URL>
}
}
}
}}
In this case, the call_to_action has to be placed inside the video_data (or link_data) parameter and has to be formatted as an object. I did also have to change & with &, as Matt mentions.

Send variable to 3rd party online form

In golang, is there a way to pipe a variable to part of a web form?
For example, sending "123 Random St." to the Street address part of https://www.dominos.com/en/pages/order/#/locations/search/ and so on? I found pizza_party*, but the GUI used is no longer available, I have also found pizzadash**, but this uses a credit card where I want to use cash. I even found a list of golang ones, but the links that they use doesn't work anymore.***
Therefore, my goal is so: order a pizza in golang through the dominos website API!
NOTE: Please suggest a package or function with example!
NOTE: I do not want to make a web scraper/data getter.
NOTE: Your answer must work on at least one box of my linked website.
NOTE: I want to fill out links similar to the provided link from the linux command line.
*https://github.com/coryarcangel/Pizza-Party-0.1.b
**https://github.com/bhberson/pizzadash
***https://golanglibs.com/top?q=pizza
This is how you post any form values onto an online form. Provided you know the POST endpoint of the service.
func main():
resp, err := http.PostForm(targetPostUrlHere,
url.Values{"Service_Type": {"Delivery"},
"Address_Type_Select": {"House"},
"Street": {"123 E 24th St"},
"Address_Line_2": {"4D"},
"City": {"New York"},
"Region": {"NY"},
"Postal_Code": {"10027"}})
}
**Note: The field keys and values are guesstimates. You must inspect the actual key names expected in the form.
In your case, https://www.dominos.com/en/pages/order/ is an endpoint for the form page. Once the form is filled and submitted, the information is submitted using POST method akin to the code afore-mentioned to a dedicated CREATE endpoint (C in the CRUD), which normally can be found in the <form> html tag.
<form action="posttargetendpoint" method="POST">...</form>
Once the POST operation is successful, usually a web service would redirect you to another page. In your case, it is https://www.dominos.com/en/pages/order/#/section/Food/category/AllEntrees/
However, any good web service wouldn't expose the POST endpoint in the clear since it is the vulnerable point of attack. You're welcome to find out by inspect he Domino's page source and adjust the field values in the Go code accordingly.
Now to make a command line prompt to wrap around the PostForm code, I suggest you look into https://github.com/codegangsta/cli which is a very nice package for creating quick command line app.
I assume you mean pipe information originating from your backend to another site on behalf of a user?
The standard way of passing information between domains is via HTTP params, usually via a GET request, but this capability would need to be supported by established protocols the remote site. You can also use an iframe to embed the page of another site onto your page, however, you wouldn't be able to remotely interact, call JS code, or even query the page at all. Cross-domain security safeguards justifiably prohibit such capability, and generally speaking, interacting on behalf of the user via their browser is also restricted for security reasons.
However, if you're looking to emulate user behavior such as with a bot or web scraper from your own host or browser then that's a different story. There are tons of frameworks provide rich capability for interacting with a page. I'd recommend checking out Selenium, which acts as a virtual browser. There are also tons of libraries in Python for processing data from HTML and structured data. You might want to check out Beatiful Soup and Scrapy.
Hope this helps.

Can I use Google Adsense For Search (AFS) ad units with AMP?

I need to put on my site Google Adsense for Search(AFS) ad units (see screenshot).
But I'm looking in AMP documentation and don't find this ad type here.
https://www.ampproject.org/docs/reference/amp-ad.html
Is there a way to do this or AMP is not supporting these ads?
Regards, Kadmos
There's a Github issue discussing this topic: https://github.com/ampproject/amphtml/issues/2659
If the integration you want is this: https://support.google.com/adsense/answer/9879?hl=en then you should experiment with putting it inside an amp-iframe.
Yes, it is possible to put CSA ads on AMP pages
<amp-ad width=auto height=300
type='csa'
layout='fixed-height'
data-afs-page-options='{"pubId": "partner-pub-id", "query": "flowers"}'
data-afs-adblock-options='{"width": "auto", "number": 2}'>
</amp-ad>
https://github.com/ampproject/amphtml/blob/master/ads/google/csa.md
AMP currently supported providers like AdSense. You can place ads on your page by using the amp-ad component. See the sample snippet.
<amp-ad width="320" height="250"
type="adsense"
data-ad-client="ca-pub-8125901705757971"
data-ad-slot="7783467241">
</amp-ad>
You need to specify which provider you want on the type attribute and then set up some other attributes that are specific to that provider.
You can also check this blog for reference.