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')
Related
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!
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
I've just looked online but couldn't find the answer:
Is it possible to include a link in an HTML e-mail, so that when a user clicks it, it takes them to post a pre-defined text on their Twitter account, e.g. "#username #hashtagterm This text comes up automatically for me to tweet"?
I guess that if a user isn't logged in, they'll have to go past the login screen and then arrive at the page where they can send the tweet, right?
As I said, it needs to work reliably in an email, so I guess it shouldn't have any javascript associated with it.
Thanks for any help.
Try this, replacing the text with what you want:
https://twitter.com/intent/tweet?text=this+is+a+test
See intents
I've a trouble with my link on published action.
When my action is published, the link appear like that:
http://www.facebook.com/l.php?u=http%3A%2F%myDomain.com%2F%3Ffb_action_ids%3D3085543269620%26fb_action_types%3Dvideo.watches%26fb_source%3Drecent_activity&h=dAQF21zjX&enc=AZP6SPsPIfAKMoNKqLKjTEig1nsAERVmwUcrfURxEHA34JS11i5ofB29bXKBaOrkm0cOv-Lyg5IVTth3Kr308Qar
And I see on another app who used the same action, the link appear like that:
http://www.facebook.com/connect/uiserver.php?app_id=XXXXXXX&method=permissions.request&redirect_uri=http%3A%2F%2FTheDomain.com%3Ffb_action_ids%3D3056990355815%26fb_action_types%3Dvideo.watches%26fb_source%3Drecent_activity&response_type=token&display=page&auth_referral=1
Did you know why we haven't not the same publish link type ?
I want to publish with an URL like that: http://www.facebook.com/connect/uiserver.php?app_id=XXXXXXX&m.....
Best regards, sorry for my poor english :/
The link of the first type appears when a users click on a link which will take them to an external site.
The link of the 2nd type appears if the app has enabled Authenticated Referrals in the app's settings. When a user click a link of this type, Facebook links into the Authentication Dialog to generate an access token or OAuth code, the user is then redirected to the Action URL.
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.