I have the following metatags set
og:title Supercompany
og:url https://xxxxx/Business/Grumble/?id=xxxxxxxxxxxxx
og:image https://xxxxxxx/Content/Images/logo4fb.png?23122014
og:type xxxxxx:organization
og:hashtags #xxx #xrfgg #sdsv #vdsdg #vdvdvd
og:description aaaa | cghydgdegezhztt
When I share the above, only the description shows up. How do I get the hashtags to show?
I am using the below to share to FB.
FB.ui({
method: 'share',
href: linkToShare,
action_type: 'xxxxxx:yyy',
action_properties: JSON.stringify({
organization: linkToShare
})
I couldn't solve this with share, so I ended up concatenating the hashtags with the description and sharing with feed instead of share.
FB.ui({
method: 'feed',
link: linkToShare,
description: hashtags
}
hashtags = description + " " + hashtags
Related
1.Everything work fine before share, I shared to Facebook Messenger and click the social content, the redirect link is not the link that firebase generated. The link has become the dynamic domain mixed with the title and description.
2.I tried to copy only the generated firebase link and paste to Facebook Messenger, social content loaded, then by clicking the content it call the dynamic link correctly and launch the app.
const link = new firebase.links.DynamicLink('https://example.com/parameter' , 'abc123.app.goo.gl')
.android.setPackageName('com.example.android')
.ios.setBundleId('com.example.android')
.social.setTitle("Social Title")
.social.setImageUrl("http://exmaple.com/super.png")
.social.setDescriptionText("Description");
firebase.links().createShortDynamicLink(link, 'SHORT')
.then((url) => {
Share.share({
message: "Message Title",
url: url,
title: "Title"
}, {
// Android only:
dialogTitle: 'Super Share'
})
// ...
});
How to share with correct dynamic link not just copy and paste, consider the user behavior.
Below is Our Requirement:
Sharing the dynamically changing content of a page in Linked IN (URL, title, summary and image).
Problem Statement:
1. All other content except Image is getting shared in Linked IN
Approach 1: Using Linked In Share URL
<a target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&url=<<OUR URL>>&title=<<Our TITLE>>&summary=<<OUR SUMMARY>>">Share</a>
Issue:
1. The URL above doesn’t have the parameter to pass the image like title, summary etc.It is fetching the image from meta tag content which is having the property as “og:image” in the page
<meta property="og:image" content="<<IMAGE URL>>">enter code here
Since the image is changed dynamically in the page, we tried dynamically changing the content of this meta tag using jQuery. But when the new share window is opened it is trying to fetch the default image available in meta tag and not the one set using jQuery.
Approach 2: Using AJAX Post Submit Action
function shareOnLinkedInTest() {
var dataJson= {"share": {
"comment": "Posting from the API using XML",
"content": {
"title": "A title for your share",
"submitted-url": "http://developer.linkedin.com",
"submitted-image-url":
"ImageURL",
},
"visibility": { "code": "anyone" }
}};
$.ajax({
type: 'POST',
crossDomain : true,
contentType: "application/json",
dataType:"jsonp",
jsonp: 'jsonp-callback',
url: "https://api.linkedin.com/v1/people/~/shares?format=json",
data:dataJson,
success: function(data) {
alert("it works>>>>>>>>>>>>>>"+data);
},
error : function (xhr, ajaxOptions, thrownError){
alert("error");
console.log(xhr);
console.log(thrownError);
}
}); }
Issue:
This is throwing 401 –Unauthorized exception as there is no option to enter the user credentials in the above script while sharing the content
It has been observed while going through various reference sites that Linked In is having cache issue while sharing the content.
https://www.wix.com/support/html5/ugc/e828aa26-d50b-4e5a-a982-ff563ca7e3dd/061f3e24-55e1-418d-ab65-9d6b0457b863
Getting old image while sharing page in LinkedIn
Can anyone help on this please????
Thanks In Advance,
Saritha
LinkedIn's crawler does not execute in-page Javascript, so if you are relying on client-side code to set the value of the meta tags, it will not be picked up when LinkedIn grabs the page for sharing. The value has to be rendered into the page statically (and if it has to be a dynamic value, that would have to be chosen at the back-end and rendered into the page).
Regarding your second approach, you have to authenticate a user before you attempt to post a share, which is why you're getting a 401 Unauthorized error when you try. There's more information about making an authenticated REST API call available at https://developer.linkedin.com/docs/rest-api
I use the meteor-ssr package to render email templates serverside and send them
Template:
Hello
A request to change your payment account was sent. If this was not you, your account may be compromised and you should reset your password immediately.
New account: {{pending.email}}
Click the link below to confirm the change.
{{id}}
And server
sendPaymentChangeToken: function() {
SSR.compileTemplate('paymentChangeEmail', Assets.getText('paymentChange.html'));
var user = Meteor.user();
var email = user.emails[0].address;
var token = user.payment.token;
var html = SSR.render("paymentChangeEmail", token);
Email.send({
from: 'Tabler <no-reply#tabler.com>',
to: email,
subject: 'Payment Confirmation',
text: html
});
}
Problem is the link tag i rendered as
27d8bdca14be4522abdb5fddf9f86c9f8ba29a3500660
Instead of actually providing a link
Any help is much appreciate
You are assigning your string of HTML to the text property instead of the html property.
Don't send pure HTML emails though, that's a good flat for spam filters. Send a multipart email with equivalent HTML and plain text parts. Hopefully the email package will do The Right Thing if you assign values to both html and text.
You need to change text o html like akshat says
Email.send({
from: 'Tabler <no-reply#tabler.com>',
to: email,
subject: 'Payment Confirmation',
text: html
});
To
Email.send({
from: 'Tabler <no-reply#tabler.com>',
to: email,
subject: 'Payment Confirmation',
html : html
});
Assuming that token in sendPaymentChangeToken is being mapped to {{id}} in your SSR template, it looks like you forgot to include the server URL.
Try:
var token = Meteor.absoluteUrl() + user.payment.token;
I want a dynamic link to be generated and placed in a users' alfresco dashboard. The link would be say "inbox" which will have to be in the following format http://www.mysite.com/preauth.jsp?email=hello#domain.com . The only dynamic part of the link would be hello#domain.com which will be the email address of the user currently logged in. How can this be achieved Any help will be greatly appreciated.
Using alresco community 4.2a
If you'd like to implement this using a dashlet then take a look at will's sample dashlet on github: https://github.com/share-extras/sdk-sample-dashlet
All you need to do is to modify the ftl of the dashlet:
...normal html
link
Another approach is to add your link to Alfresco Share's header & add the following item (http://wiki.alfresco.com/wiki/Share_Header):
<item type="external-link" id="pre-auth">http://www.mysite.com/preauth.jsp?email={useremail}</item>
{useremail} is an unkown token here, thus you'll have to customize site-webscripts\org\alfresco\components\header\header.get.html.ftl & add your token there (sorry only 4.1 code as i don't have a 4.2 in-place):
<script type="text/javascript">//<![CDATA[
var ${jsid} = new Alfresco.component.Header("${jsid}").setOptions(
{
siteId: "${page.url.templateArgs.site!""}",
siteTitle: "${siteTitle?js_string}",
minSearchTermLength: ${args.minSearchTermLength!config.scoped["Search"]["search"].getChildValue("min-search-term-length")},
tokens:
{
site: "${page.url.templateArgs.site!""}",
pageid: "${page.url.templateArgs.pageid!""}",
userid: "${user.name?js_string}",
useremail: "${user.email?js_string}",
}
}).setMessages(${messages});
Alfresco.util.createTwister.collapsed = "${collapsedTwisters?js_string}";
//]]></script>
I am trying to create a company directory which will provide a link to an employees linkedin public profile, if the uses chooses to connect.
So on our employee profile page, the user can choose to link their linkedin account to their employee profile. We initiate an oAuth process and we retrieve their hashed linkedin id, which we then store. Great. Now the part that isn't working.
Based on their plugin example, i have this...
<script type="text/javascript" src="http://platform.linkedin.com/in.js">
api_key: xxxxxxxxxxxx
authorize: false
</script>
<script type="text/javascript">
function INTEST() {
IN.API.Profile().ids("pU-LBvD_y0")
.fields(['id', 'firstName', 'lastName', 'picture-url', 'public-profile-url'])
.result(function (result) {
profile = result.values[0];
})
.error(function (errorResult) {
var i = 0;
});;
}
</script>
I receive all information except the public-profile-url.
Any help would be greatly appreciated.
I'm sure you have this figured out by now. But for the benefit of others:
When using the JavaScript API you must convert the profile field names from the dashed notation to studly caps. For example first-name becomes firstName. public-profile-url becomes publicProfileUrl
Reference the following API documentation at
http://developer.linkedinlabs.com/tutorials/jsapi_profile/