Sitecore - Is it possible to have target="_blank" on Image SXA Component - sitecore

Is it possible to send user to another page, for example in this case www.stackoverflow.com, when user clicks on the image? Basically right now, when someone clicks on the image itself it does not send the user to another page, even though it has the target="_blank", as you can see from the pictures.
Here is the first picture:
The link view:
This is the HTML that I get, as you can see there is not target="_blank" in console

Related

Trigger User Action from Facebook Messenger Bot

I have a working Facebook messenger bot.
From the Messenger app, I would like my bot to trigger the "camera" action (to snap a new picture or video) for the user.
To clarify with a hypothetical context, I would create persistent menu action which mimics the behavior of clicking the "camera" button under the message text area.
I looked into the "Page Call To Action" operation of the Graph Api but could not find parameters that would produce the desired behavior.
Here is the solution to your problem.
In Facebook Messenger, you can open a webview and load a webpage. But remeber that good old HTML 5 provides us with a simple way of asking the user to use their camera when they are on mobile.
These steps below work today
You can use a url button to open a webview as such
"buttons":[
{
"type":"web_url",
"url":"https://url_to_your_webpage",
"title":"View Item",
"webview_height_ratio": "compact"
}
]
In your webpage, include this HTML5 element that allows user to take image via camera on mobile
<input type="file" accept="image/*" capture="camera" />
Submit the image to your servers, close the webview, and do any processing required. For example you can now send the image back to the user from your bot.
I'm pretty sure there is no way to do what you want, right now. Hopefully, in the future, the Messenger team will add more features like this to bots.
You can simply send a message to the user to click on the camera icon, click the picture and send it to the bot. You can then receive that image as the attachment -> read 'Message with image attachment' and reply to the user. This will be more of the native experience. In webview the user can deny permission to the camera (if asked for). Hope this helps!

Like Button counts the likes of a PDF but does not actually post the activity?

I have implemented a Like Button on a page, attempting to allow users to "Recommend" a PDF. The button appears on the page and seems to function correctly. Clicking the button opens the comment box; and a user can enter a comment. However no activity is actually posted on the test user's page. The counter even increments correctly and the "recommend" action is disabled after the test user has clicked it. This status is remembered on reload, and the counter is never reset.
<div class="fb-like" data-href="www.bgsd.com/hockey/stats/2012/
East_Side_Hockey_Fall2012.pdf" data-send="false" data-layout="button_count"
data-width="70" data-show-faces="false" data-action="recommend"></div>
Can this button not be applied to this type of resource (PDF)?
Well the PDF can't possible have the meta tags used by Facebook to display a story about that URL - when you put the URL into Facebook's Debug Tool you'll see.
You probably should/could have pointed the Like plugin at a URL which has a download link (or redirect) to the PDF, not to the PDF URL itself

how to send a url with facebook like button?

I have page which has the url like the following.
http://example.com/?f=chatter
It has three links.
When I click on a link it details page is display. Which has the url like
http://example.com/?f=chatter&aid=6
But this url does not appear in the browser address bar. It displays in a textbox on its details page. The url in address bar remains the same http://example.com/?f=chatter
My page is of .tpl
Now I want to add the facebook like button to the details page which will share the link of that details page which is displaying in the textbox.
But when I click on the facebook like button, it share the link which is in the address bar of the browser.
{$url} this contains the details page url which is displaying in the textbox.
I have used the following code of the facebook like button.
<iframe src="//www.facebook.com/plugins/like.php?href={$url};send=false&layout=standard&width=450&show_faces=false&action=like&colorscheme=light&font&height=35" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:35px;" allowTransparency="true"></iframe>
Where in href I have place the {$url}.
I don't know if this will be useful to you but I'm using a jquery plugin that is unfortunatly not free ($5) called jQuery Social Share Buttons plugin
Although I'm having problems getting the facebook like button to include a popup which allows posting the url to my feed (keep getting 'Unknown RPC service: widget-interactive' error when trying to implement), I was able to get the twitter button to post the url.

What's the difference between the Like button with or without Open Graph META tags?

I have a very basic website with the potential for having hundreds of pages, and would like to have a the Facebook Like button on each one.
However, before I do it, I would like to know the difference between inserting the Like button with, or WITHOUT using Open Graph META tags.
I don't want each page that visitors 'Like' to become their own Facebook pages, but I WOULD like their 'Like' to show up on their wall so their friends can see it.
Is the only real reason for using Open Graph to specify what exactly it is that you want to show up in the message and 'Like' post?? (example: 'Dave likes The Rock - IMDB' with a picture of the movie and a description underneath.)
#Vali What you are suggesting:-
Including Open Graph tags on your Web page, makes your page equivalent to a Facebook Page. This means when a user clicks a Like button on your page, a connection is made between your page and the user. Your page will appear in the "Likes and Interests" section of the user's profile, and you have the ability to publish updates to the user.
is not possible. Kindly see my similar question:
Convert my Site to Facebook Graph Object
As you said you can add a Like button without OpenGraph. That's the easy way and with that you don't have any future connection with the person who liked your link/page.
Including Open Graph tags on your Web page, makes your page equivalent to a Facebook Page. This means when a user clicks a Like button on your page, a connection is made between your page and the user. Your page will appear in the "Likes and Interests" section of the user's profile, and you have the ability to publish updates to the user.
Using Open Graph you have a greater control on what you want to appear on that person's wall.
Open Graph is still beta. If you want to use OpenGraph you need to create a FB app, get the APP ID and add it to your webpage. If you want to use the simple Like button, you just add the fb:like tag and that's all.
don't want each page that visitors 'Like' to become their own Facebook pages
This will not happen. You're the single admin of your page.
Is the only real reason for using Open Graph to specify what exactly it is that you want to show up in the message and 'Like' post??
Yes, you can do this with Open Graph. I suggest using Open Graph if you want to post enhanced wall posts and if you want to get connected with the users who likes your page.

Facebook Like button og:image needs to be scraped to be displayed

I've got a Drupal website with articles on them which have Facebook like buttons.
Now I've got all the OpenGraph metatags added on the pages and it's all working perfectly except for one thing.
Site visitors can share a page URL or like a page URL.
When a new article is added and the first person who presses the like button will not see the image added in the og:image tag.
If another person afterwards presses the like button, the og:image however is visible so it seems to me Facebook needs to scrape the page first before the og:image is added in the 'Facebook Like window'.
The Facebook share doesn't seem to suffer from this problem and does it right from the first time.
Now whenever somebody adds a new article, I'd need the URL of the article to be scraped automatically by Facebook using some PHP code or some other fix...
Anyone who knows if autoscraping a URL is possible or does anyone have an idea for a workaround?
You can use the graph API with scrape=true to force Facebook to scrape you right when you create your contents
https://developers.facebook.com/docs/beta/opengraph/objects/