w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
Delete a tweet using the twitter-async library by searching for the tweet?
To do what you want, you have to: 1st: search the tweets of the user, and interpret its json to get the id of a repeated tweet if there is one. (notice that when comparing the text you shall use the php function htmlspecialchars() because there are special characters that are stored in twitter as HTML entities [ref.]); 2nd: remove the repeated tweet if it exists; 3rd: (re-)post the tweet. (optionally you can add a 0th step, which would be to try a normal submission of the tweet, and advance to the other steps only if you have an error, it's up to you.) Here you have a code that makes these requests and interpret the json of the search, etc.: $settings = array( 'oauth_access_token' => "...", 'oauth_access_token_secret' => "...", 'consumer_key' => "...", 'consu

Categories : PHP

Facebook Doesn't appear on share windows when trying to share an Image
after correcting my childish mistake (see EDIT part in question) and Using this code snippet I finally solved this problem. if anybody knows whats the difference between using contentValue and my approach please share that with me.

Categories : Android

FHSTwitterEngine can't post a tweet with image
Error say that you missed/invalid parameter of URL first check it? If make sure that you have to passed all required parameter. then convert your URL string as legal URL. such like, NSString *urlString = [NSString stringWithFormat:@"URL_STRING"]; NSURL *myUrl = [NSURL URLWithString:[urlString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; For more info about stringByAddingPercentEscapesUsingEncoding.

Categories : IOS

iOS tweet image - Can I get the image url before upload?
1) I don't see how you plan on conjuring an image URL before you upload the image - that is a chicken/egg situation. I would recommend taking a look at an actual image URL after you upload it to facebook, twitter, etc and try to figure out even one character of what it would be for the next image you upload. Regarding twitter specifically the image URL is also going to vary depending on what upload service is being used. 2) regarding uploading the image and getting the URL why not look into tapping into the flickr API?

Categories : IOS

Unable to implement sending tweet along with image to twitter in asp.net mvc
You can do this in LINQ to Twitter, using the TweetWithMedia method, like this: static void TweetWithMediaDemo(TwitterContext twitterCtx) { string status = "Testing TweetWithMedia #Linq2Twitter " + DateTime.Now.ToString(CultureInfo.InvariantCulture); const bool possiblySensitive = false; const decimal latitude = StatusExtensions.NoCoordinate; //37.78215m; const decimal longitude = StatusExtensions.NoCoordinate; // -122.40060m; const bool displayCoordinates = false; const string replaceThisWithYourImageLocation = @"....images200xColor_2.png"; var mediaItems = new List<Media> { new Media { Data = Utilities.GetFileBytes(replaceThisWithYourImageLocation), FileName = "200xColor_2.png",

Categories : C#

Tweepy python code returns KeyError on 'media' entity when tweet does not contain image
When you work with python dictionaries and you are not sure if given key exists in the dictionary you shouldn't use __getitem__ syntax. Instead you can use dict.get method: foo = {'foo': 1} foo.get('bar') which returns None if key is not in the dictionary, or dict.setdefault method: foo = {'foo': 1} for.setdefault('bar', []) Which will return second argument if key is not in the dictionary. If setting default behavior for a dictionary is not what you you can always use dict.get with optional parameter which will be returned if key doesn’t exist in the dictionary: #This will return 1 foo.get('bar', 1) In your case you can use solution like below: for tweet in tweepy.Cursor(api.search,q="#piframe",count=5,include_entities=True).items(5): #print tweet.text for ima

Categories : Python

Tweet, without using the tweet sheet
if u wanna share the tweet without using the tweet sheet see my answer it will post on twitter wall without using the tweet sheet see hear and also set the twitter account in the device. hope this helps unfortunately the class TWRequest is deprecated in iOS 6 but alternatively we can use SLRequest present in the Social framework the answer for this is similar to the old answer i commented out something that i dont want but if u want to select which account to use then uncomment the commented code - (IBAction)doneButtonClicked:(id)sender { ACAccountStore *account = [[ACAccountStore alloc] init]; ACAccountType *accountType = [account accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierTwitter]; NSString *message = _textView.text; // NSArray *arrayO

Categories : Iphone

WhatsApp - share image from iOS
hello I already had this problem before. See if this helps you https://www.dropbox.com/sh/8nm1mkw9bpgwmni/AAB-8g2CuWTQ5jKHPj3MiUzka?dl=0 :)

Categories : Iphone

Share Image to my Facebook page using c#
Solution 1 : You can use of stream publish method, Here is the sample demo url by using this method it is also possible to share video, flash and mp3 aslo http://demo.vatlab.net/StreamPublish.aspx http://sudiptasanyal.blogspot.in/2011/09/share-image-with-facebook-in-aspnet.html Solution 2: Use of Graph API , refer more about http://www.aspsnippets.com/Articles/Share-Image-Photo-Pictures-on-Facebook-in-ASPNet-using-Graph-API.aspx

Categories : C#

Twitter - share button, but with image
Look into twitter cards. The trick is not in the button but rather the page you are sharing. Twitter Cards pull the the image from the meta tags similar to facebook sharing. example: <meta name="twitter:card" content="summary_large_image"> <meta name="twitter:site" content="@site_username"> <meta name="twitter:title" content="Top 10 Things Ever"> <meta name="twitter:description" content="Up than 200 characters."> <meta name="twitter:creator" content="@creator_username"> <meta name="twitter:image:src" content="http://placekitten.com/250/250"> <meta name="twitter:domain" content="YourDomain.com">

Categories : Twitter

Share custom image with Google+
Methods for Populating the +Snippet Use Schema.org microdata (recommended way): <body itemscope itemtype="http://schema.org/Product"> <h1 itemprop="name">Shiny Trinket</h1> <img itemprop="image" src="{image-url}" /> <p itemprop="description">Shiny trinkets are shiny.</p> </body> Use Open Graph properties: <meta property="og:title" content="..." /> <meta property="og:image" content="..." /> <meta property="og:description" content="..." /> Title and meta "description" tags: If the page's <head> element contains <title> and <meta name="description" ... /> tags, the +Snippet uses the title and the content attribute of the description meta tag for the snippet description. For the thumbnail image, the s

Categories : PHP

share image doesn't refresh
you will see still croped picture That is your actual og:image http://pravoved.ru/images/pravoved-avatar.jpg, but as you said, it gets cropped by Facebook. In the share dialog, when you inspect the preview image, you can see its URL is https://fbexternal-a.akamaihd.net/safe_image.php?d=AQAtXVeqx7Q9IPa8&w=100&h=100&url=http%3A%2F%2Fpravoved.ru%2Fimages%2Fpravoved-avatar.jpg&cfs=1&upscale – so you can clearly see that the value of the url parameter is what you want it to be. If you change the last parameter of that URL to upscale=0, you can see it is exactly your image (cropped to square). (You can’t do that in the dialog, of course – I’m mentioning it just to prove the point.) Your original image is only 100 x 103 pixels big, whereas Facebook recommends

Categories : Facebook

Share image to Google+ in Android app?
I guess you can always take a look at the web api if they provide you with means to authenticate your user and upload posts with an image. I assume however, that simply using the app itself will save you a lot of hassle.

Categories : Android

Share A High Resolution Image
Please try below code : + (UIImage*)imageWithImage:(UIImage*)image scaledToSize:(CGSize)newSize; { UIGraphicsBeginImageContext( newSize ); [image drawInRect:CGRectMake(0,0,newSize.width,newSize.height)]; UIImage* newImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); return newImage; } specify your new size as (850,850) and pass your original image, but make sure your height and width ratio of original image should be same as converted image ratio. Hope it will works for you.Thanks EDIT : For Capturing screenshot of your view follow below code : - (UIImage*)captureView:(UIView *)yourView { CGRect rect = [[UIScreen mainScreen] bounds]; UIGraphicsBeginImageContext(rect.size); CGContextRef context = UIGraphicsGet

Categories : Objective C

onClick: share image on facebook
try this: <div id="mImageBox"> <img id='my_image' src='' alt='' width="auto" height="auto" onclick="fbs_click(this)"/> </div> <script> function fbs_click(TheImg) { u=TheImg.src; // t=document.title; t=TheImg.getAttribute('alt'); window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false; } </script> You don't need to use <a> tag (surrounding the <img> tag) for case that JS disabled, because in that case the JS that should inject the src attribute will not work also.

Categories : Javascript

Facebook Share not scrapping image on first try, but on second try after caching happens
I found a not-so-elegant workaround to this problem. I found out that this didn't happens when i used the facebook scrapper (debugger) before trying to share a new link, so i started searching for a way to do this before a user shares the link. This is my solution, which works about 80% of the time (jQuery): $.post("https://graph.facebook.com/?id="+encodeURIComponent(url_to_be_shared)+"&scrape=true", function(contents){ //here you do the facebook share code }); This sometimes fails with no response at all, so you might want to add something like this: $.post("https://graph.facebook.com/?id="+encodeURIComponent(url_to_be_shared)+"&scrape=true", function(contents){ //here you do the facebook share code }).fail(function(){ //call function a

Categories : Facebook

How To add caption with image share on instagram in android?
you should write caption on image and then create uri. private Bitmap writeTextOnDrawable(int drawableId, String text) { Bitmap bm = BitmapFactory.decodeResource(getResources(), drawableId) .copy(Bitmap.Config.ARGB_8888, true); Typeface tf = Typeface.create("Helvetica", Typeface.BOLD); Paint paint = new Paint(); paint.setStyle(Style.FILL); paint.setColor(Color.WHITE); paint.setTypeface(tf); paint.setTextAlign(Align.CENTER); paint.setTextSize(convertToPixels(mContext, 11)); Rect textRect = new Rect(); paint.getTextBounds(text, 0, text.length(), textRect); Canvas canvas = new Canvas(bm); //If the text is bigger than the canvas , reduce the font size if(textRect.w

Categories : Android

Share an image with a content provider in Android app
As @Sun Ning-s comment noted some "share target apps" can handle URI-s starting with "content://.." which you have implemented. Other apps handle file uri-s starting with "file://...." so you have to implement a 2nd share menue "share as file" private Intent getFileShareIntent(String fullPathTofile) { final Intent shareIntent = new Intent(); shareIntent.setAction(Intent.ACTION_SEND); shareIntent.setType("image/jpeg"); shareIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://" + fullPathTofile)); shareIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); return shareIntent; } You can use the android app intentintercept to find out what other "share source apps" provide.

Categories : Android

facebook og image share for highlight feature
Which link are you passing in og:video? YouTube does that with the use of the og:video tag. og:image for normal image og:video when video in highlight mode The URL needs to be in this format: <meta property="og:video" content="http://www.youtube.com/v/k86xpd26M2g">

Categories : PHP

Sharing On Tumber in iOs,want ot share both image and text?
You can try this - (BOOL)sendPhotoToTumblr:(NSString *)photo usingEmail:(NSString *)tumblrEmail andPassword:(NSString *)tumblrPassword withCaption:(NSString *)caption; { //get image data from file NSData *imageData = [NSData dataWithContentsOfFile:photo]; //stop on error if (!imageData) return NO; //Create dictionary of post arguments NSArray *keys = [NSArray arrayWithObjects:@"email",@"password",@"type",@"caption",nil]; NSArray *objects = [NSArray arrayWithObjects: tumblrEmail, tumblrPassword, @"photo", caption, nil]; NSDictionary *keysDict = [[NSDictionary alloc] initWithObjects:objects forKeys:keys]; //create tumblr photo post NSURLRequest *tumblrPost = [self createTumblrRequest:keysDict withData:imageData]

Categories : Iphone

Is it possible to allow the containers running on the same image to share their filesystem?
You can use the volumes. The idea is for the container A to create a volume mounted in a specific directory, to perform all operation that are needed to be shared there and for the container B to mount the volume from the container A. 1) ID=$(docker run -d -v /tmp base /bin/sh -c 'echo hello > /tmp/world') 2) docker run -volumes-from $ID base cat /tmp/world Notice that there is no commit. Both container use the same image.

Categories : Misc

Facebook is not showing Thumbnail Image on share page
I have made some chnages in my images, which I'm using for thumbnail image, now some posts shows thumbs and some doesn't show any thumb, if someone faced this type of problem please share. You can go through this link for more information.

Categories : PHP

How to share/attach image from server in gmail in android
It seems that the STREAM and EXTRA_STREAM intent types are not really well defined and ultimately depend on how the target app interprets them. If you want to assure the image as a binary to be in the email, the safer way will be to download the image from the server an attach it to the intent yourself. There's more light about the topic in here: "android.intent.extra.STREAM"

Categories : Android

How does Facebook share image base64 from Google App Engine
Facebook reads the og:image meta to resolve the image from your webpage. og:image don't allow data-URI image (base64 encoded). You have to provide an image url in og:image, but with that url, you can make a workaround to simulate the behaviour of a direct image resolution and get the image from your appengine database. This is a solution in python using Django, but the concept works for everything. The name of the image is here "key.png" where key is the key of the object containing the base64 stored image. First, add an url to the list of django urls for your image resolution: (r'^image/(?P<key>[^.^/]+).png$', 'yourapp.views.image'), Then in your views, get the key from the url, retrieve your object, base64 decode and send it back with the correct mimetype: import base64 def

Categories : Python

How to Imgae Url path correct by code for share image on facebook
First of all ServerMap path is working fine as expected, it will give rootlevel path. To get url, you need to append it to the domain name. What best you can do is put the value in config file and use it. Also you can try Directory.GetParent(fileName).FullName; To get Parent folder name. This is concept to decide what approach you choose.

Categories : Asp Net

dynamically change facebook og image in a fancybox share button
og:image cannot change by url. You need to give different share urls for different images. For example :- www.myURL.com/?pic=img1 www.myURL.com/?pic=img2 etc. And a server side language ( like php ) can read the "pic" GET argument and change the og:image.

Categories : Facebook

Place "SHARE" button in the vertical & horizontal center of an image (when onhover fires)
If we're talking pure html and css, you could insert another <div> or even an <a> inside the image holder above the image. a.share { position:absolute; width:100%; height:100%; background:url(path to icon) rgba(0,0,0,0.75); background-repeat: no-repeat; background-position:center center; }

Categories : HTML

How can I share share read/write access to a file within the same process, but forbid it externally?
Files are generally not for multi-user interactions such as this. A database is what is needed here. Then the data you need written can be saved to the database and all the synchronous handling would now be the databases responsibility. If you still require a file, after the data has been input, it would be an idea to generate the file when needed based off the database data.

Categories : C

Google Plus share on ios directs to web page with broken links in share and cancel button
Something must be wrong with your google plus api setup. Google Plus is trying to reopen your app using a URL scheme that looks something like youdefinethis://somethingtodoinyourapp If you have setup google plus to use a specific url scheme to reopen your app, you need to define this same scheme in your project settings under Info -> URL Types. This is a hard problem to solve because of the lack of information you can give us without risking your privacy. Did you complete all the instructions that are listed here?: https://developers.google.com/+/mobile/ios/getting-started

Categories : IOS

Is there any way to share on google plus stream, without entering to share dialog ..?
Too low of a reputation to comment, but check out this answer Where it states UPDATE 3: Google just announced Google+ History. You can use it to write "moments" (which are private by default) but can then be made public by sharing them directly to your stream and/or your profile. One of the moment types is CommentActivity.

Categories : Iphone

Google plus share button callback (when share is succeded)
https://developers.google.com/+/web/share/ onendinteraction function(jsonParam) If specified, this function is called when the interaction bubble disappears. You can use this callback function to modify your page, such as resuming a video, when the bubble closes. This function accepts a single parameter, which is identical in structure to the parameter passed to onstartinteraction.

Categories : Javascript

android hide folder to sd card and share the image inside the hidden folder
If you want to hide folder in Android or any Linux based system just add . as prefix to folder or file name. However if you mount your SD card on Windows machine then these folders will be visible, with the . in front of the folder name, as a normal folder.

Categories : Android

Android Share Image from Phone Gallery to Facebook using Facebook API
You could open a stream to the image from the URI and post it that way using ContentResolver. Session session = Session.getActiveSession(); Bitmap photo = BitmapFactory.decodeStream(getContentResolver().openInputStream(uri)); Request request = Request.newUploadPhotoRequest(session, photo, new Request.Callback()); RequestAsyncTask task = new RequestAsyncTask(request); task.execute();

Categories : Android

How to/Can we hide share target apps(e.g OneNote, Twitter, etc.) that are displayed after tapping share from charms bar using c# in win 8/winrt apps?
Yes, it is possible to do what you want to. Here is the link for the same. The procedure is The Share charm automatically lists all of the apps installed on your PC that can share. But if you don't want certain apps to appear, you can remove them from the list without uninstalling them.To remove an app from the app list :- Swipe in from the right edge of the screen, tap Settings, and then tap Change PC settings. (If you're using a mouse, point to the upper-right corner of the screen, move the mouse pointer down, click Settings, and then click Change PC settings.) Then tap or click Share. Under Use these apps to share, find the app you don't want to appear, then set the slider to Off to remove it.

Categories : C#

what does it mean "(include_path='.:/usr/share/pear:/usr/share/php')"?
Thats just the directories showing you where PHP was looking for your file. Make sure that cron1.php exists where you think it does. And make sure you know where dirname(__FILE__) and $_SERVER['DOCUMENT_ROOT'] are pointing where you'd expect. This value can be adjusted in your php.ini file.

Categories : PHP

Share links with my app using "Share via" in Android
I have set an Intent Filter on an activity so that my app displays in the "Share via" dialog. That part works fine, but I'm not sure how to actually get the data into my "new post" dialog when it launches. If by "the data", you mean the text that was shared, call getIntent() on your activity and read the EXTRA_TEXT extra for that. In the case of browsers sharing URLs, EXTRA_TEXT should be the URL.

Categories : Android

PHP calling in more than 1 Tweet
The issue is in your foreach loop. You're trying to print $echo inside the loop, which is an array. So you'll receive an Array to string conversion error. A for loop seems more suitable in this case: for ($i=0; $i < count($tweets); $i++) { echo $tweets[$i]['text']." "; } Update: To also show the links in tweets, you can do: for ($i=0; $i < count($tweets); $i++) { //echo $tweets[$i]['text']." "; $var = preg_replace("/([w]+://[w-?&;#~=./@]+[w/])/", "<a target="_blank" href="$1">$1</a>", $tweets[$i]['text']); $var = preg_replace("/#([A-Za-z0-9/.]*)/", "<a target="_new" href="http://twitter.com/search?q=$1">#$1</a>", $var); $var = preg_replace("/@([A-Za-z0-9/.]*)/", "<a href="http://www.twitter.com/$1">@$1</a>", $var);

Categories : PHP

How to get Tweet ID from post
The id of your tweet can be found in an object returned from API call: $tweet = $twitteroauth->post('statuses/update', array('status' => $toTweet)); Now $tweet holds the details about your status update, including it's ID.

Categories : PHP

Getting last tweet on android (API 1.1)
As previously discussed on official Twitter forums, it is by now required to utilise OAuth for all methods in API 1.1 which leaves some constraints. You can although use this library to receive an access token and as stated in the library: Just implement TwitterOAuthView.Listener and call start() method. This blog post is furthermore a complete tutorial on utilising a twitter access token to login and writing an update to twitter. Hope this helps.

Categories : Android

how to display tweet after it was sent?
Blaze, you are reloading the table view right after presenting the compose sheet, so it reload the table right there - and you are passing the completion block as nil, so nothing will happen when user finishes tweeting. Also, you need to be sure that you are reloading not only the table, but the array or any other object that is the source of tweetTableView. For example: When calling the tweet compose sheet: [self presentViewController:tweetSheet animated:YES completion:^(SLComposeViewControllerResult result) { dispatch_async(dispatch_get_main_queue(), ^{ [self reloadTweets]; }); }]; And then, you reload the tweets source and only then the table -(void)reloadTweets { tweetsArray = .... //load the tweets from the internet, and only then reload the table [sel

Categories : Iphone



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.