Zapier to look up Twitter URL mentions - twitter

Is it possible to create a Zap that will look-up URL mentions on Twitter?
Been scratching my head with this one, since simply entering URL into Zapier's Twitter Search field doesn't seem to do the trick.
Is it at all possible? Twitter uses its URL shortening service t.co on all links posted. Might this be a reason for me not being able to find any mentions of my URL even when I post one myself? Twitter's native search function finds URL just fine, but not Zapier.

OK, I think I figured it out.
First, use Twitter's special "url" prefix for URL search:
url:amazon - will find URL with the word “amazon” anywhere within it.
Second, most importantly, it looks like the Twitter account I used for testing got ignored after a couple of same URL posts. So be aware of that too.

Related

Shorten URL in Swift iOS with your custom website domain name

I want to shorten a share URL I have in my app when users share a shop. I want a methodology or an API that allows me to shorten the URL to make it look clean but with my website's name.
for instance:
longURL: "https://example.com?x=somevalue&y=someothervalues"
Then when I shorten the URL with an API or method it would produce a small URL similar to this: "https://mywebsite.com/shortenedURLcode"
here is my code:
link = URL(string: "https://mywebsitename.com/share/?shop="+concatenate(getKey!,"&title="+shopName.text!.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)!,"&desc="+summary.text!.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)!,"&img="+profileImgURL))
I want to shorten the above link with my website's hostname.
How can I do that?
Here are two options to consider for shortening your URLs:
Bitly API
One option Bitly's API, which will allow you to make requests that return shortened links that fit the above mentioned criteria.
It appears to achieve the result you seek, you must make two requests: one to receive the link with custom domain, and a second to customize the "back half" (See revenant API Documentation in hyperlinked text).
The result of request #2 will contain your fully custom link.
Rebrandly API
The far better option in my opinion is Rebrandly. While I personally don't have any experience using any of Rebrandly's products, I would recommend this option as it has a generous free tier to get you started.
And best of all, the entire shortened link can be formulated in a single request. Will note that what Bitly calls a "back-half" is referred to as the "slashtag" by Rebrandly, but these terms both refer to the exact same thing.
API documentation can be found here.

Does the Twitter API auto shorten URLs

I know this question has been asked before however the answers I found where a little old and I know that twitter has now made the t.co/xyz service manditory on all posts recently. I'm just wondering if when using the oAuth API service it will automatically shorten any url? Anyone know what the current process in play is? Do I still need to shorten the url pre posting?
Thanks very much
Yes. Even when using OAuth, all links will be wrapped in t.co short URLs. Even if the link is shorter than 20 characters!
See the post in the discussion groups.
There is also some documentation about recent and upcoming changes to t.co shortening (2012-04-12).
You can shorten the URL yourself if you want, but it will still get wrapped.

Retrieve full URL in Twitter Search API

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.

Highlight search terms in forum when coming from websearch

in the recent past i’ve noticed quite often that, when searching something with google and looking at one of the search results, that the search terms are bold on the site.
how can this be done? is it a feature of google which is messing around with other sites (i hope not!) or are some sites parsing the referrer and check for search engine links and try to hilight the search terms?
i’m curious for the answers
That feature works by looking at the http referer header sent by browser. This post should explain how it work: http://weblogtoolscollection.com/archives/2009/04/10/how-to-highlight-search-terms-with-jquery/
You have to look into http referrer http server variable, there You will find URL where user comes from.
I believe you can look in the HTTP headers for the referrer (i.e. the previous URL visited). If your visitor arrived from Google, that will be the URL of the search page. Sending this header is a feature of most web browsers and it's useful for things like this. As Google search results are GET queries, a standard referrer url looks like:
http://www.google.com/search?q=stack+overflow
You can parse these out to get the query terms and format appropriately using server side script. I'm sure there's a library to do this, but it wouldn't be hard to write one.
after googling around for a while i found a plugin for phpBB.
it can be found in their forums: http://www.phpbb.com/community/viewtopic.php?f=69&t=784615
it will take all popular search engines into account and hilight the search terms in the forum. reading the plugin is a great source of information

Google sees something that it shouldn't see. Why?

For some mysterious reason, Google has indexed both these adresses, that lead to the same page:
/something/some-text-1055.html
and
/index.php?pg=something&id=1055
(short notice - the site has had friendly urls since its launch, I have no idea how google found the "index.php?" url - there are "unfriendly" urls only in the content management system, which is password-restricted)
What can I do to solve the situation? (I have around 1000 pages that are double-indexed.) Somebody told me to use "disallow: index.php?" in the robots.txt file.
Right or wrong? Any other suggestions?
You'd be surprised as how pervasive and quick the google bots are at indexing site content. That, combined with lots of CMS systems creating unintended pages/links making it likely that at some point those links were exposed is the most likely culprit. It's also possible your administration area isn't as secure as you think, the google bot got through that way.
The well-behaved, and google recommended, things to do here are
If possible, create 301 redirects from you query string style URLs to your canonical style URLs. That's you saying "hey there, web bot/browser, the content that used to be at this URL is now at this other URL"
Block the query string content in your robots.txt. That's like asking the spiders or other automated programs "Hey, please don't look at this stuff. These aren't the URLs you're looking for"
Google apparently allows you to specify a canonical URL now via a <link /> tag in the top of your page. Consider adding these in.
As to whether doing the well behaved things is the the "right" thing to do re: Google rankings ... who knows. Only "Google" knows how their algorithms work now, and will work in the future, and by Google, I mean a bunch of engineers and executives with conflicting goals on how search should work.
Google now offers a way to specify a page's canonical URL. You can use the following code in your HTML to tell Google your canonical URL:
<link rel="canonical" href="http://www.example.com/product.php?item=swedish-fish" />
You can read more about canonical URLs on Google on their blog post on the subject, here: http://googlewebmastercentral.blogspot.com/2009/02/specify-your-canonical.html
According to the blog post, Ask.com, Microsoft Live Search and Yahoo! all support the canonical tag.
If you use sitemap generators to submit to search engines, you'll want to disallow in them as well. They are likely where Google got your links, from crawling your folder and from checking your logs.
Better check what URI has been requested ($_SERVER['REQUEST_URI']) and redirect if it was /index.php.
Changing robots.txt will not help, since the page is already indexed.
The best is to use a permanent redirect (301).
If you want to remove a page once indexed by Google the only way, more or less, is to make it return a 404 not found message.
Is it possible you're posting a form to a similar url and google is simply picking it up from the source?

Resources