I need to get the base url or the original url from the short url that is obtained from twitter in the form http://t.co...
Is their any way to get the original base url from this...please suggest
Any kind of help will be appreciated..
Look at this link, https://dev.twitter.com/docs/tweet-entities
Especially "The media entity" part
One of these from api should solve your problem.
media_url The URL of the media file (see the sizes attribute for
available sizes)
media_url_https The SSL URL of the media file (see the sizes
attribute for available sizes)
url The media URL that was extracted
display_url Not a URL but a string to display instead of the media
URL
expanded_url The fully resolved media URL
Related
Just want to seek some help to make my URL better:
This is my original URL:
https://www.wilcom.com/Hatch/Products/HotcakeStoreAdmin/ProductViewer/tabid/3605/slug/Embroidery-Basics/Default.aspx
This is the URL after Advanced DNN Friendly URL Setting:
https://www.wilcom.com/Hatch/Products/Hotcake-Store-Admin/Product-Viewer/Embroidery-Basics
How do I make it even shorter in the Friendly URL setting?
I want to remove "Products", "Hotcake-Store-Admin" and "Product-Viewer" from the above URL.
Thanks if anyone can help me with it...
Jack
Here's a breakdown of what is likely building out your URL to be what it is currently.
To shorten your URL, you'll need to restructure the pages on your site, and/or change the name of the page in the respective page settings for the pages where the URL doesn't meet your standards.
You'll see two other images below that outline how to get to the page settings and the URL setting specifically. Your URL will first be based upon the site's page structure (or information architecture) when you add your pages. Second, it will be determined by the setting you apply in the image named "step-01".
Please review the images and make your changes as you desire to meet your URL requirements.
I need to format this canonical URL and I cant figure out how! I've looked around the web and this site a lot and I've realized that I need a specific answer.
Problem Description:
My BLOG's desktop view has (say) URL: www.x.com/page.html
The same page in mobile view URL would be: www.x.com/page.html?m=1
Its all good and dandy to this point, but the problem comes when I use facebook comments with this. It parses url based on this: www.x.com/page.html
So, it is identifying ?m=1 in the end of the first URL as an entirely different URL.
i.e
It is treating those two URL as different
Both of them are URL for the same page and I want them to be treated the same
Could anyone provide me a way to check if the loading page is ?m=1 and if it is ?m=1 then remove the ?m=1 when sending it to facebook?
I WOULD GREATLY APPRECIATE IT IF THE SOLUTION IS INLINE if it is not inline, oh well, I just need a solution right now.
Current code snippet used is this:
<fb:comments colorscheme='light' expr:href='data:post.url' expr:title='data:post.title' expr:xid='data:post.id' height='110' width='560'/>
Let me break the question into small parts(incase someone is not a native speaker and wants to help/learn about this problem)
I want to detect if the loading page has ?m=1 in its URL or not. The canonical URL for this is data:post.url applied as
expr:href='data:post.url'
If a ?m=1 is detected from data:post.URL , I want to remove it and send the remaining URL into expr:href= so that both my URLs
are identified the same when my website displays facebook comments.
Click the image link below to look at this image please. This is the same URL but the
comments are being sent to me as if they're from different URLs. I
want them to appear under the same thread.
This is it--> http://i.stack.imgur.com/M7fK2.png
I haven't found this particular answer anywhere and I am hopeful that
some creative solutions will pop out in this site!
In your code
<fb:comments colorscheme='light' expr:href='data:post.url' expr:title='data:post.title' expr:xid='data:post.id' height='110' width='560'/>
Use data:post.canonicalUrl instead of data:post.url
This is the Blogger's layout tag for getting the Canonical URL of a blog post (This will always default to the blogspot.com domain, so there won't be ccTLD issues as well)
I have a couple of questions about the url returned for the thumbnail link in document list api:
1) is the url public? (does not seem to be access controlled)
2) does the url remain the same no matter when we get the link (is the url time limited or anything like that)?
Regards,
LT
I am working on ASP>Net site and my client wants when any user insert a youtube URL in his/her profile at that time my c# code or any JQuery Code or any youtube API code check this URL that it is exist on youtube.com or not. I have found many things but most of them give us string matcher or URL pattern checker code but my requirement is check this URL i.e. exist on youtube.com and this video is show for public video.
Can anyone help me out.....
Match pattern of URL against known pattern of YouTube video See Stack Overflow example
Use AJAX call to your server to screen scrape the entered URL and check for 404 header or typical text resulting in "The video you have requested is not available." using the HTML Agility pack for c#.
I can write this for you but it will cost you. :)
I am using the Twitter Search API to search for a URL. Here's an example:
http://search.twitter.com/search.json?q=url.com
The JSON response gives me the shortened URL of each search result. Is there a way for me to retrieve the full URL of each result?
From 11/2011, you can use the include_entities=true parameter to retrieve full tweet entities, which include the expanded URL (and a lot more)
https://dev.twitter.com/docs/using-search
You will have to pragmatically request each URL yourself and see where it redirect to.
On Twitter Search, you can use the same URL endpoint that Twitter Search uses to expand shortened URLs: http://search.twitter.com/hugeurl. For example, if you wanted to expand the shortened URL http://bit.ly/jIhqhq:
$ curl "http://search.twitter.com/hugeurl?url=http://bit.ly/jIhqhq"
http://edition.cnn.com/2011/SPORT/football/05/03/may.03.cnn.top.10/index.html/
This will only work for the more popular shorteners (bit.ly, j.mp, etc.) Also, this AJAX endpoint is pretty aggressively rate-limited, so don't expect to be able to use this for a production application, but something like 10 times an hour should be fine.
Not currently through Twitter. On Twitter.com, those shortened URLs are automatically expanded into something readable, however search.twitter.com doesn't seem to be expanding the t.co shortened URLs at this time.