Can you put a hyperlink in a UIActivityItemProvider? - ios

I have a huge link. I want to share this link when a user in my app posts to facebook from within the app. However my link is too large so I'd like to shorten it. Is there anyway (natively) I could have something like "Download the app HERE" where HERE redirects to my super long link?

What you're looking to do really can't be done with UIActivityViewController since each service has a completely different mechanism for encoding/representing links. Your best is probably to use some kind of URL shortening service such as Google's

Related

When I copy and paste my post URL on any place around social media, it changes its structure

So, no one wants to click and open it. Because it looks like a virus or spam. So, how can I get rid of this horrible and long thing from my web post link, please?
https://readalways.com/%e1%8b%a8%e1%88%9d%e1%88%b5%e1%8c%8b%e1%8a%93-%e1%89%b0%e1%8b%93%e1%88%9d%e1%88%ab%e1%8b%8a-%e1%8a%83%e1%8b%ad%e1%88%8d/
%e1%8b%a8%e1%88%9d%e1%88%b5%e1%8c%8b%e1%8a%93-%e1%89%b0%e1%8b%93%e1%88%9d%e1%88%ab%e1%8b%8a-%e1%8a%83%e1%8b%ad%e1%88%8d/%e1%8b%a8%e1%88%9d%e1%88%b5%e1%8c%8b%e1%8a%93-%e1%89%b0%e1%8b%93%e1%88%9d%e1%88%ab%e1%8b%8a-%e1%8a%83%e1%8b%ad%e1%88%8d/
You can use short links. There are several websites which provide short links instead of long URLs and make redirect to your URL when somebody clicks on a short link.
For example service https://bitly.com/

Dynamic Changing URL (Link Redirector) Service?

I wanted to see if there is a service out there that can dynamically change a URL
Ex. If I wanted someone to go to a landing page like www.handsomeman2015.com/landing2015 and I used a link shortner like bit.ly so I would provide the URL like bit.ly/ag95g and it would direct customers to
But I want to be able to change the URL extension to landing2016, landing2017 etc without changing the web link, is this possible?
Sorry if my question isn't using the correct terminology, as I'm a bit new to this stuff.
Linkredirector is a dynamic URL shortener that lets you change the destination URLs of your links. As long as you register an account you can login and edit your links.
Disclaimer, I work at Linkredirector.
Yourls seems to be an interesting option, if you don't mind installing the service on your own website. Additionally, tiny.cc seems to allow you to change the link through their API.

Avoid robots from going into a www.domain.com/thishash when link posted to twitter, facebook

I'm building a service where people gets notified (mails) when they follow a link with the format www.domain.com/this_is_a_hash. The people that use this server can share this link on different places like, twitter, tumblr, facebook and more...
The main problem I'm having is that as soon as the link is shared on any of this platforms a lot of request to the www.domain.com/this_is_a_hash are coming to my server. The problem with this is that each time one of this requests hits my server a notification is sent to the owner of the this_is_a_hash, and of course this is not what I want. I just want to get notifications when real people is going into this resource.
I found a very interesting article here that talks about the huge amount of request a server receives when posting to twitter...
So what I need is to avoid search engines to hit the "resource" url... the www.mydomain.com/this_is_a_hash
Any idea? I'm using rails 3.
Thanks!
If you don’t want these pages to be indexed by search engines, you could use a robots.txt to block these URLs.
User-agent: *
Disallow: /
(That would block all URLs for all user-agents. You may want to add a folder to block only those URLs inside of it. Or you could add the forbidden URLs dynamically as they get created, however, some bots might cache the robots.txt for some time so they might not recognize that a new URL should be blocked, too.)
It would, of course, only hold back those bots that are polite enough to follow the rules of your robots.txt.
If your users would copy&paste HTML, you could make use of the nofollow link relationship type:
cute cat
However, this would not be very effective, as even some of those search engines that support this link type still visit the pages.
Alternatively, you could require JavaScript to be able to click the link, but that’s not very elegant, of course.
But I assume they only copy&paste the plain URL, so this wouldn’t work anyway.
So the only chance you have is to decide if it’s a bot or a human after the link got clicked.
You could check for user-agents. You could analyze the behaviour on the page (e.g. how long it takes for the first click). Or, if it’s really important to you, you could force the users to enter a CAPTCHA to be able to see the page content at all. Of course you can never catch all bots with such methods.
You could use analytics on the pages, like Piwik. They try to differentiate users from bots, so that only users show up in the statistics. I’m sure most analytics tools provide an API that would allow sending out mails for each registered visit.

How do search engines see dynamic profiles?

Recently search engines have been able to page dynamic content on social networking sites. I would like to understand how this is done. Are there static pages created by a site like Facebook that update semi frequently. Does Google attempt to store every possible user name?
As I understand it, a page like www.facebook.com/username, is not an actual file stored on disk but is shorthand for a query like: select username from users and display the information on the page. How does Google know about every user, this gets even more complicated when things like tweets are involved.
EDIT: I guess I didn't really ask what I wanted to know about. Do I need to be as big as twitter or facebook in order for google to make special ways to crawl my site? Will google automatically find my users profiles if I allow anyone to view them? If not what do I have to do to make that work?
In the case of tweets in particular, Google isn't 'crawling' for them in the traditional sense; they've integrated with Twitter to provide the search results in real-time.
In the more general case of your question, dynamic content is not new to Facebook or Twitter, though it may seem to be. Google crawls a URL; the URL provides HTML data; Google indexes it. Whether it's a dynamic query that's rendering the page, or whether it's a cache of static HTML, makes little difference to the indexing process in theory. In practice, there's a lot more to it (see Michael B's comment below.)
And see Vartec's succinct post on how Google might find all those public Facebook profiles without actually logging in and poking around FB.
OK, that was vastly oversimplified, but let's see what else people have to say..
As far as I know Google isn't able to read and store the actual contents of profiles, because the Google bot doesn't have a Facebook account, and it would be a huge privacy breach.
The bot works by hitting facebook.com and then following every link it can find. Whatever content it sees on the page it hits, it stores. So even if it follows a dynamic url like www.facebook.com/username, it will just remember whatever it saw when it went there. Hopefully in that particular case, it isn't all the private data of said user.
Additionally, facebook can and does provide special instructions that search bots can follow, so that google results don't include a bunch of login pages.
profiles can be linked from outside;
site may provide sitemap

Is there a method to programmatically add a website shortcut to the iPhone?

I am looking to add a button to my website which easily allows people to turn the site into a shortcut on their phone.
I'm looking to automate the actions shown here: http://www.simpleleapsoftware.com/blog/how-to-create-shortcuts-iphone-ipod-touch-115 for my users, specifically for my website.
I'm open to any alternative ideas of making the process of adding a link to my website less painful, if putting a button on the site is not the easiest way of doing things.
I know this isn't a very helpful answer, but I seriously, seriously doubt this is possible. If Apple were to allow such an action to be automated, i.e. by pressing a button on the site, then it would be trivial for malevolent websites to do it without any kind of authorization from the user. Have you ever heard of a site that automatically adds bookmarks, say on a desktop browser? To the best of my knowledge, it can't be done, and for good reasons. If the user wants a home screen button, they'll have to add it themselves. I think the best you can do is have a simple instructional graphic that shows the user how to do it for themselves.

Resources