Share simple content on Facebook time line - javascript

I want to share some simple text content on facebook time line using javascript of html. I have tried the below but i am unable to add any content, Can anyone help me how to create the below url to share content dynamically. What is the key for sharing content.
facebookshare
Thanks
djrecker

Try to encode the url shared, i.e. if you are using PHP try to call
p[url]=urlencode(LINK)
Same to the title and summary

Related

How to get data of a website when a link is pasted of typed

Hey guys any idea on how to make something like this? where you paste or type a link and it display a little content of that website just like what facebook did using JavaScript or react js
you can use an iframe to show another website on your website

Trace URL's that link to my iframe/widget

I have created a widget.html page with, for example, a "Powered by Example.com" box/widget. And I have an HTML iframe that links to that specific page (widget.html) on my site.
<iframe src="http://example.com/widget.html"></iframe>
I share that iframe code with website owners who want to use my widget on their sites.
I want to be able to see every single site that uses my iframe. I would prefer a code that creates a txt file or even a MySQL Table with all websites URLs that use my widget on their websites.
I basically want to track the sites that use my widget as an iframe . How do I do that? With Javascript? PHP? MySQL?
P.S. I'm not sure if an iframe is the best way to link widgets off my site, but I'm open for your suggestions. Thanks in advance.
use jquery
then load a request page throgh jquery like : $("#div1").load("demo_test.txt");
and send a request uri parameter to it
you will find the current url using the widget and alos you can get the parameter

Site summary when posting links

Does anyone how to do the following: when user inputs a link, how to get that page summary, so when you input facebook.com you get a page summary like title. I've tried googling it, but nothing came up.
Try adding meta tags to your site so when facebook parses the link it will search for the correct meta information. Not only facebook will parse the link either.
<meta property=”og:title” content=”Your Page Summary goes here,” />
https://blog.kissmetrics.com/open-graph-meta-tags/
If you are looking to add it to your website read this article.
http://www.sanwebe.com/2013/06/extract-url-content-like-facebook-with-php-and-jquery
As I understood your question (but if you clarify it, it'll be better ;))
You have to use Javascript on client or cUrl on server side to query the website and get the content.
Then parse the received contents to extract data you want to display.

Trouble inserting a javascript variable into an HTML tag [duplicate]

I want to add twitter card meta tags to my website. i cannot add static tags since the content attribute in the meta tag has to change dynamically.
Plz help if someone has a solution.
You can't, at least not in any way that Twitter is going to recognise.
When Twitter fetches the page, it is always going to get the meta elements that are in the HTML, never ones added with client side JavaScript.
If you are changing content dynamically then make use of the history API to update the URI, and make sure that the server will generate all the content for each URI when the URI is used as an entry point (you can still use JavaScript to generate the content when moving from another page on the site).
You can generate pages dynamically (server side) as long as you don't intend to change them after. Think about the process in the same way you would build landing pages for SEO purposes. Twitterbot is in many ways really similar to Googlebot and similar indexers.
See https://dev.twitter.com/blog/twitter-cards-tips-tricks for a few examples of sites doing this.

How to grab and display img from external site

I'm trying to figure out how to grab the image from an external site, in my case, http://bikerace.com/tracks/[levelCode]
(as an example level code, nhx874, the url would be http://www.bikerace.com/tracks/nhx874)
Users on bikeracelevels(dot com) have to input the level code THEN upload a screenshot. I'm trying to remove this requirement by automatically grabbing the image based on the code they input, since I could append their input code to the url, then somehow find the image (since the only image on the page would be the one I want)
How could I accomplish this?
Thank you very much in advance!
Get this cross-domain AJAX plugin for use with jQuery: https://github.com/padolsey/jquery.fn/tree/master/cross-domain-ajax
Use it to load the page on bikerace.com/[levelcode], then select the image from the data as you normally would with jQuery.

Categories

Resources