I have a new website, which I've just uploaded my first blog post onto.
I have social sharing buttons on the page, but a few don't seem to work as expected.
In Twitter the URL doesn't appear at all. Its as if its ignored. Here's the twitter link:
https://twitter.com/intent/tweet/?url=http://www.andrewburns.info%2Fblog%2Ffirstsortedvalue+function+in+Qlikview+script.php&via=AndyBurns89
Facebook and Reddit work fine. Google plus cuts off the URL after the first space, even though i used urlencode on the link:
https://plus.google.com/share?url=www.andrewburns.info%2Fblog%2Ffirstsortedvalue+function+in+Qlikview+script.php
I tried posted the link directly into Twitter and it doesn't seem to recognise that its a webpage at all. It doesn't shorten the link down like it normally does.
Have a look at this https://dev.twitter.com/web/tweet-button/web-intent. Take a look at the query parameters and notice the http:%3A%2F%2Fexample.com%2F
Related
I have a Social Networking website and I wanted to know how i could get the content from a websites OG tag. Like how Facebook embeds links into their website. I Only want to get the title,img,desc and nothing else then embed that link into my website. I used regex to validate if its a link and if it was post it in a link, Nevertheless i dont know how to embed the links :) I would really like if someone Could help. Also the code which i have does this :
Just saves the post to the database
Shows the posts from the database (After detecting if its a link,video,image,gif...)
This is my first post on stackoverflow, I really do apologize if i didnt give good info. If you would like some info
i got a problem here. On my site i have a facebook share button, but it sends a link with some get variables. So im guessing facebook just handles these as $_GET['blabla'] but i want that link to be shared.
Currently the link to be shared is:
http://www.EXAMPLE.com/wptest/?page_id=38&vodid=1&t=152
so the link is:
http://www.facebook.com/sharer/sharer.php?s=100&p[url]=www.EXAMPLE.com/wptest/?page_id=38&vodid=1&t=152
But facebook only shares:
http://www.EXAMPLE.com/wptest/?page_id=38
how to i get my url so facebook (and other sites) treat the whole thing as a link instead of just filling the get array?
What you should do is URL encode the link before going to the sharer.php link, so the link you should use is:
http://www.facebook.com/sharer/sharer.php?s=100&u=http%3A%2F%2Fwww.example.com%2Fwptest%2F%3Fpage_id%3D38%26vodid%3D1%26t%3D152
i.e.
http://www.example.com/wptest/?page_id=38&vodid=1&t=152 becomes http%3A%2F%2Fwww.example.com%2Fwptest%2F%3Fpage_id%3D38%26vodid%3D1%26t%3D152
If you look at the above example, you'll see that the Facebook Sharer page will correctly display the URL in the dialog:
My fancy OpenGraph Facebook like button for my quotation mashup suddenly decided to stop working. It now says I provide an invalid url. The url is basically quotation?q=123 with 123 being the currently displayed quotation. They are usually generated randomly when someone arrives at the page.
All was fine, now it seems to be implying I can't have URLs like this, must I encode them? Or that I have meta tags that OpenGraph needs wrong or in the wrong place. It was odd that it suddenly started working, even the example from Facebook is showing the error:
Invalid URL
The requested URL "/plugins/like.php?
Did Facebook break?
I used some development tool they provide to get more info, which seems to baffle me even more as my meta tags are inside the head tag.
Debugging info from Facebook
Ideas, just wait to see if Facebook fixes itself?
Something must have been wrong with the mothership, as a day later give or take a few hours, my webpage (app) with the fanciest like button is working as expected again.
Quotation Mashup
I run ads on my site which are usually YouTube videos. I would like to find out if a user clicked these videos. I'm basically trying to use this data in a statistics plugin that I'm creating.
I've tried searching many different keywords but I can't really find anything.
I would appreciate it if I could be pointed in the right direction. Any ideas, hints or links are welcomed.
As you mention YouTube I doubt you have control over the URL.
But, if you can control the URL embedded in the video, then I would suggest building a simple redirect script on your server. Make sure the URL contains either the redirect URL or a code representing the URL which would be held in your Data Base. Add a logging function to the redirect script and hey presto.
If you have no control over the URL, then off the top of my head maybe you could implement some client side JS to add an overlay to the video which becomes the click-able element and implement the URL redirect script above. Some methods to get the URL from the video: https://www.google.com/search?q=jquery+youtube+URL
I have a php generated wep page which has a lot of share buttons. Twitter, facebook and google+.
I have used the code that twitter gives for the tweet button, and it works fine.
You click it, the window pops up, you tweet.
My problem is, the count next to the button seems to be working normally throughout the site, except the photo gallery, which seems stuck at 0 even though I have tweeted it to test.
My page is here
Is there some obvious error in it?
Also, are there any tools for detecting such errors for twitter like facebook has the OG debugger?
I don't know what exactly the problem is. I have faced with such issues in the past. May be an issue with twitter.
There are a few problems related to this.
If the link is shortened, Twitter won't add it up unless you add the "counturl" url property.
You may try adding these parameters in the tweet button code. This worked for me in one of my projects
data-url="http://dev.twitter.com/pages/tweet_button"
data-count="vertical"
data-counturl="<?php echo $_SERVER['PHP_SELF']; ?>"
Also another issue with twitter tweet button is that the tweet counts are not accurate in real time. They are cached and updated asynchronously. See http://dev.twitter.com/pages/tweet_button_faq#count-api-increment