LinkedIn apply button not displayed - javascript

I've created new app in the LinkedIn developer website, and inserted this code on my website:
In the head:
<script type="text/javascript" src="//platform.linkedin.com/in.js">
api_key: MY_API_CODE
authorize: true
onLoad: onLinkedInLoad
</script>
In the body:
<script type="IN/Share"></script> <br>
<script type="IN/Login"></script>
<br/><br/>
<script type="IN/Apply" data-email="test#example.com" data-jobTitle="Testing" data-companyID="1337"></script>
Both share and login buttons are shown but not the apply button.
Can someone tell me what the problem here is?

Related

Selenium Python: How to fetch text/html data from <script> tag with javascript file from a web page?

The code looks like this:
<script async="" id="__NEXT_PAGE__/restaurants" src="/_next/static/~k5VPZk5KBtLKJOP7fLbR/pages/restaurants.js"></script>
<script async="" id="__NEXT_PAGE__/_app" src="/_next/static/~k5VPZk5KBtLKJOP7fLbR/pages/_app.js"></script>
<script async="" src="/_next/static/chunks/146.5cc25d7743407960833f.js"></script>
<script src="/_next/static/runtime/webpack-562f11f96da3918c3d37.js" async=""></script>
<script src="/_next/static/chunks/styles.4fc2149595e9293ccd52.js" async=""></script>
<script src="/_next/static/chunks/styles.4fc2149595e9293ccd52.js" async=""></script>
I used
webdriver.Chrome().find_element_by_id("NEXT_PAGE/restaurants").get_attribute("innerHtml") and
webdriver.Chrome().find_element_by_xpath("//script[#src='/_next/static/chunks/136.ff85cd2297a8e5bf9619.js']").get_attribute("innerHtml")
but they returned None.
I am not really sure if there is text inside the tag btw. This is the page: https://food.grab.com/ph/en/restaurants
I am trying to fetch latitude and longitude for restaurants on the pages after pressing 'load more' button. This info is available in tag with id = 'NEXT_DATA' for first 16 restaurants but beyond that it seems to be hidden somewhere. I know python but not javascript.

Make Mailchimp Pop Up Redirect To A Page

When using MailChimp pop up I can not redirect people who just opted-in to another page, I can do that easily with Embedded form, but I'm wondering how to do it with that code
<script type="text/javascript"
src="//downloads.mailchimp.com/js/signup-forms/popup/embed.js"
data-dojo-config="usePlainJson: true, isDebug: false">
</script>
<script type="text/javascript">
require(["mojo/signup-forms/Loader"], function(L) {
L.start({
"baseUrl":"mc.us18.list-manage.com",
"uuid":"218acfebac44df61c3f27402c",
"lid":"08af3cd08b"
})
})
</script>

Incorporate MathJax onto Weebly website

I run a weebly.com website.
Following instructions to incorporate MathJax, http://www.dessci.com/en/support/MathType/works_with.asp#!target=weebly
First step I completed, i.e. copy and paste
<script type="text/javascript"
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
on all page layouts, just before </head>
Next set of instructions are unclear, i.e.
From MathType's Preferences menu choose: Cut and Copy Preferences.
From the Equation for application or website group, choose MathJax:
LaTeX from the list. Click OK.
Where do I find "MathType's Preferences menu"?
Thank you
Researched some more.
Solved it with placing the following on each header page, before </head>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']],
displayMath: [['\\[','\\]'], ['$$','$$']]}});
</script>
<script type="text/javascript"
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>

signin with Linkedin code give me html validation error

I'm using https://validator.w3.org to validate my HTML 5 website. I'm using Linkedin javascript login SDK. I followed this tutorial https://developer.linkedin.com/docs/signin-with-linkedin
I got this error
The text content of element script was not in the required format: Expected space, tab, newline, or slash but found a instead.
in this code block
<script type="text/javascript" src="//platform.linkedin.com/in.js">
api_key: YOUR_API_KEY_HERE
authorize: true
onLoad: onLinkedInLoad
</script>
The problem that this code is provided by the tutorial.
I solved this problem by separating the loading of the API and the initiation of the API.
<script src="http://platform.linkedin.com/in.js?async=true"></script>
<script>
IN.init({
api_key: 'YOUR_API_KEY_HERE',
onLoad: onLinkedInLoad,
authorize: true,
scope: 'r_basicprofile r_fullprofile r_emailaddress r_contactinfo',
});
</script>
this code is valid code by W3C

LinkedIn Login button is not displaying

I am trying to access linkedIn from my website. For that I have created a new Application and get the API key. And implemented in my code below. This gives me the blank page but works only in Javascript API developer console.
<script type="text/javascript" src="http://platform.linkedin.com/in.js">
api_key: mykey
authorize: true
</script>
</head>
<body>
<script type="In/Login">
Hello, <?js= firstName ?> <?js= lastName ?>
</script>
</body>
Please help to get the login button..
The code looks alright as far as I can tell. As mentioned in the docs:
Verify that your API key, is specified in the framework script tag.
Verify that the full domain name you are using to access the html
file is specified in the key's configuration details.
Check your JavaScript Console for any framework errors.
If you are using Firebug or WebKit's Developer Tools, check to make
sure that the following files were loaded automatically: in.js,
userspace.js and framework.js
I found that you need a specific jQuery version to make the button appear!
<script type="text/javascript" src="http://code.jquery.com/jquery-1.5b1.js"></script>
<script type="text/javascript" src="http://platform.linkedin.com/in.js">
api_key: xxxxxxxxxxxxx
onLoad: onLinkedInLoad
authorize: true
</script>
And to show the Button you will need also this somewhere BUT INSIDE A BODY TAG!!!
<body>
<script type="IN/Login"></script>
</body>
hope that will give some light to the issue!

Categories

Resources