I have a Twitter button on my website to allow people to tweet from the site. I am setting the text of the tweet programmatically and I’m also including a link to my site.
Everything works except that Twitter is turning the link into a preview of my website. I don’t want the preview. I want the link to stay a link.
Is there a way to do that?
From this:
enter image description here
I get this:
enter image description here
But I want this:
enter image description here
Related
In my App, I'm using UIActivityViewController to have users share urls via Twitter. This worked great prior to iOS9. Ever since the update to iOS9, this feature shows a strange effect when adding mentions or hashtags to the tweet. Scenario like this:
A user decides to share a url. User taps a button that opens an ActionSheet with all sharing options like SMS, WhatsApp, Email and Twitter.
User chooses Twitter, tweet editor opens filled with the url. Everything good so far.
User wants to add a mention or hashtag. User starts typing and selects an entry from the list of suggestions.
This results in the disappearance of the whole text from the tweet editor view. The app doesn't crash, just the text vanishes.
When adding a mention or hashtag just by typing #example_name or #examplehashtag rather than picking from the list, it works all fine.
I can observe the same behaviour on my iPhone 5S with soundcloud app, v3.14.0.
I'm sure others must have the same problem after updating to iOS9. Any help is highly appreciated.
I have a site that has some photos and I need to add to each of them twitter share button.
When user clicks that twitter share button, it should post to twitter the image, some text and
link to my site.
I tried to uploaded photos to twitrpix and put link to photos like this:
<a href="https://twitter.com/share" class="twitter-share-button" data-url="http://mysite" data-text="http://twitrpix.com/c36at My test" >Tweet</a>
It works, but photos are not displayed in twitter until you click details. I would like photos to be
displayed all the time.
It looks like when I twit mamually adding photo using button with camera photo photo, the photo is
displayed all the time. How can I make it behave the same way when I share from my site?
How can I get the description of a link that a user has tapped in the UIWebView before loading the request?
This question seemed to ask the same thing, but what he actually wanted was the URL, which is not my case. I just want to know what is the text description of the link that has been tapped by the user.
With the iOS6 update, the "Save Image" touch popup menu is now gone when users are in a website that has apple-mobile-web-app-capable enabled. This is really important for my website http://2048px.com.
We want users to be able to add the site to their home screen. The way that users obtain new wallpaper is to click on the download button and then use the Save Image touch menu to save it to their camera roll. But like I said, in iOS6 the "Save Image" option seems to be gone when the webapp is being used.
Does anyone know of some magic meta tag to turn this back on? Or maybe a fancy way to save an image to the camera roll directly.
While I never found a solution to get the save image button back, I did find a solution. I noticed that if I opened a link in a new tab and the url to the link was an external domain, the link would open in Safari instead of the webapp. On my site, all my image for download are now being hosted on an external domain on S3. I then make the download links open in a new tab only when the website is in webapp mode. I accomplish this with the following code.
if (window.navigator.standalone) {
$('a.download').attr({target:'_blank',href:orig_download});
}
I'm trying to add the Twitter Share button to my website. I've gone to https://twitter.com/about/resources/buttons#tweet and added the code to my html, but the "button" only shows up as a hyperlink.
Can someone tell me how to make the button look exactly like the normal twitter button that shows up on other sites?
Thanks.
I was able to make it work by changing the code that says
id;js.src="//platform.twitter.com/widgets.js
to
id;js.src="http://platform.twitter.com/widgets.js