How to share text or custom url to facebook using uiactivityviewcontroller? - ios

I actually want to share a custom url which does not start with 'https/http' but , 'puzzle://', where 'puzzle' is my URL Scheme. So I am sharing it as String instead of url. I am able to share that link/text via Twitter & Email using uiactivityviewcontroller. But somehow, facebook dialog box shows nothing. Also tell me that if I should share it as text or link. Thanks..

Facebook validates the URL shared to be a valid URL not any fake string in URL , a valid URL will be loaded in the sharing box otherwise it's not valid .
Example of a valid URL :
http://Google.com
Good luck!

Related

open external weblink from facebook app and pass facebook username

I am building an IOS app that will post weblinks to facebook and other social media using social media framework (not facebook-graph-api) and it works as I desire. eg:
http://example.com/page1.html?code=123456
I do however want that when my friends on facebook open that external link and it opens in an external browser - their facebook user name gets passed on to the browser so I can allow them to add comments to the weblink.
To clarify - the comments to be added will be on my website for the page they just opened (and not the comments in facebook)
Is it possible to do this ?
You can only do something with URL while posting it. Well if we posting URL on wall of known user then we can achieve your problem with following approach.
I think you can append name of friend as a get parameter in URL. So whenever your friend opens this link, its corresponding name is also passed along with URL. As far as security is concerned you can consider to append some security code to URL as well. Which will be validated against Name of friend.
For example.
http://facebook.com/?Name=Friend_Name&SecurityCode=Some_Unique_Code_Based_On_Friends_Name

Tumblr Custom URL Not Letting Me Save

I have bought a domain that I want to use as a unique Tumblr website but I can't get the url to pick up on Tumblr settings.
The domain is a .com registered with 123-reg. I've set the CNAME to the correct tumblr url and also set the A record too. When I visit the url I get the Tumblr error page so I know that the domain is pointing, however when I go to settings in Tumblr and "Test" the url it says that it's not pointing and I can't save it. What could be the problem?

GET data with Google+ share button

I want to use the Google+ share button in a HTML email. I put the hyperlink
https://plus.google.com/share?url={URL}
into the email.
But when I try the hyperlink there is a problem with the GET-data. If I put ?parameter=name into the URL, Google+ doesn't take it.
How can I send the right URL?
Per the documentation, the url value must be url encoded.
E.g. http://example.com/?foo=bar should be http%3A%2F%2Fexample.com%2F%3Ffoo%3Dbar
https://plus.google.com/share?url=http%3A%2F%2Fexample.com%2F%3Ffoo%3Dbar
In JavaScript you can use encodeURIComponent('http://example.com/?foo=bar')

How can I open to a specific friend using Find My Friend?

I know the URL Scheme is
findmyfriends://
but how can I open to a specific person if he/she is already a friend? Is there a way to add a friend if he/she is not already a friend?
I prefer using a URL handler but can do JavaScript. I'm trying to embed the code in a web page.
I don't think you can add friends via URL handler.

Sharing urls containing # with facebook, twitter

Is it possible to share the following links with facebook and twitter
http://www.somedomain.com/something#param
The problem is that when you share such links #param is cut so that you share http://www.somedomain.com/something
All you need is to replace # with %23. That will allow you to share links with hash.
Change your hash to a query string and it will be compatible with both twitter and facebook sharing. Of course this will take some work on the server to redirect the user's browser then to the url with the hash.

Resources