w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
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

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

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

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#

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

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

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

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 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

Post image from local machine to user wall of Facebook
Try to use this one and you know you are getting path from NSBundle not image so you need to get first image from picture path and then do it. NSString *picture=[[NSBundle mainBundle]pathForResource:@"4" ofType:@"jpg"]; UIImage *image = [UIImage imageWithContentsOfFile:picture]; NSMutableDictionary* params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:message, @"message",image, @"picture",nil];

Categories : Iphone

how can i check if NSUrl is a valid image url?
you can check after getting NSData from NSURL . You can use GCD to download data here is an example i created which save your image in photo library. dispatch_async(dispatch_queue_create("com.getImage", NULL), ^(void) { NSData *data=[NSData dataWithContentsOfURL:[NSURL URLWithString:@"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRKII9COB-hvMef4Zvb9XYVbXKDFZHJAHwwzzGyMiy_b-q65GD43Chd37jH"]]; UIImage *image=[UIImage imageWithData:data]; if (image==nil) { //yourImageURL is not valid image=[UIImage imageNamed:@"placeholder.png"]; } else{ //yourImageURL is valid dispatch_async(dispatch_get_main_queue(), ^{ UIImageWriteToSavedPhotosAlbum(image, nil, nil, nil); //s

Categories : Iphone

Is there a way to provide a fallback (local) image when the preferred (external/server/remote/cloud) image fails to load?
<img src="http://remotecdn.com/myimage.jpg" data-failover="/assets/notfound.jpg" /> Then: <script> $('img[data-failover]').error(function(){ var failover = $(this).data('failover'); if (this.src != failover){ this.src = failover; } }); </script> Attempt to load the actual source, but in the event of an error use the failover data property to convert it to a local resource. Since we're keeping the supplemental information separated, it should gracefully fail in browsers that can't/won't support it. More information about .error().

Categories : Jquery

html javascript Put an image over another image and post to facebook
For the first part of the question, the answer is this library http://html2canvas.hertzen.com/ It takes the html and converts it to canvas with great accuracy. I just still need to find how to post it on Facebook.

Categories : Javascript

Why does PHP fail to produce an image when loading an image that has been taken from facebook?
Try automatically "re-saving" the image after the upload with imagejpeg(imagecreatefromjpeg($filename),$filename,9); This should re-create any malformed or unrecognised headers from the original Facebook image.

Categories : PHP

Facebook opengraph image tag reading but no image appearing
Try to add a parameter after the img: http://www.disabilitydirectory.net.au/wp-content/uploads/making-it-work5.png?t=12345?

Categories : Image

how to get my facebook share dialog to display the facebook share button rather than just text?
What you are looking for is the Share Button. Facebook has deprecated this and this will no longer be supported. So, you have to use the Share Dialog instead that you've mentioned.

Categories : Facebook

How can I have a dynamic image show when someone clicks the Facebook Like button and Posts to Facebook?
Change the meta tag on click: use this example and modify it to your needs. <!DOCTYPE html> <head> <meta charset="utf-8"> <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script> <title>Title Of Page</title> </head> <body> <input type="button" value="Click Me" onclick='$("title").html("Changed Dynamically");'/> </body> </html>

Categories : Facebook

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

What is NSURL *resultURL when inviting friends through Facebook iOS SDK?
You can use it for extracting the invited friends IDs. I don't see many other purposes of that. Since we're talking about it, I'll drop here a method that I use for parsing the URL and getting the invited IDs back. - (NSArray *)invitedFriendsIdsFromURL:(NSURL *)resultURL { NSRegularExpression * regex = [NSRegularExpression regularExpressionWithPattern:@"to%5B\d+%5D=(\d+)" options:NSRegularExpressionCaseInsensitive error:NULL]; NSArray * matches = [regex matchesInString:resultURL.absoluteString options:0 range:(NSRange){0, resultURL.absoluteString.len

Categories : IOS

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

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 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

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 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

New Facebook SDK + Android. Add Image on wall facebook
I've never sent pictures from the phone, but from a server using an image link. I'll put this code in case it helps you since most of the logic is similar. final Bundle parameters = new Bundle(); parameters.putString("name", getString(R.string.app_name)); parameters.putString("caption", "haha"); parameters.putString("link", "www.google.com"); parameters.putByteArray("picture", byteArray);//I took this one from your code. My key is "picture" instead of "image" Session.openActiveSession(this, true, new StatusCallback() { @Override public void call(Session session, SessionState state, Exception exception) { if (session.isOpened()) { new FeedDialogBuilder(EndGameActivity.this, session, parameters).build().show(); //you can try this one instead of the

Categories : Java

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

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

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

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

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

Creating a NSURL from an NSURL instance variable - invalid pointer
I'm surprised it seems I can help on this forum, since I'm a bit of a beginner, but the NSURL class has initialization methods that you should use, like initFileURLWithPath: You probably shouldn't override the NSURL initialization methods.

Categories : Objective C

Storing and Retrieving Image Path From android application folder On Pre Created SQLite Database & Setting the image to Image View
I would only save the image name in the db and then get the resource identifier with context.getResources().getIdentifier(). Check out this similar question.

Categories : Android

How to get image from an Image Control Type in .net c#, I need to save this image in a file and then use it for later comparing
Previewing Image in ASP.NET Image Control using C# help you to get image from an Image Control Type. You can save the image in the below way. Image bitmap = Image.FromFile("C:\MyFile.bmp"); bitmap.Save("C:\MyFile2.bmp"); You should be able to use the Save Method from the Image Class and be just fine as shown above. The Save Method has 5 different options or overloads. //Saves this Image to the specified file or stream. img.Save(filePath); //Saves this image to the specified stream in the specified format. img.Save(Stream, ImageFormat); //Saves this Image to the specified file in the specified format. img.Save(String, ImageFormat); //Saves this image to the specified stream, with the specified encoder and image encoder parameters. img.Save(Stream, ImageCodecInfo, E

Categories : Dotnet

I am using CIFilter to get a blur image,but why is the output image always larger than input image?
This is a super late answer to your question, but the main problem is you're thinking of a CIImage as an image. It is not, it is a "recipe" for an image. So, when you apply the blur filter to it, Core Image calculates that to show every last pixel of your blur you would need a larger canvas. That estimated size to draw the entire image is called the "extent". In essence, every pixel is getting "fatter", which means that the final extent will be bigger than the original canvas. It is up to you to determine which part of the extent is useful to your drawing routine.

Categories : IOS

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 add a Facebook share button using the Facebook Javascript SDK in an Ajax call?
Try this. <script type="text/javascript"> $(document).ready(function() { $('#share_button').click(function() { FB.ui({ method: 'feed', name: '<%= fb_data[:name] %>', link: '<%= fb_data[:link]%>', picture: '<%= fb_data[:picture] %>', caption: '<%= fb_data[:caption] %>', description: '<%= fb_data[:description] %>' }); }); }); </script> Does it work ?

Categories : Javascript

php image uplaod show default image when image has not been uploaded
you could use file_exists(), like if( !empty($row['article_image']) AND file_exists(YOUR_PATH . $row['article_image']) ) { //show your image from db } else { //show your default image }

Categories : PHP

How to convert image in to binary image using Image processing with Emgu CV
You can transform image into binary by converting it to grayscale and then apllying threshold after that: var bwImage = colorImg.Convert<Gray, byte>().ThresholdBinary(new Gray(yourThrehold), new Gray(255)); if you have small blobs (salt and pepper noise) you can use median filter -function Median or erode the image (function Erode and that dilating it - funcrtion Dilate)

Categories : C#

Facebook like image viewing
From my understanding, when you click on an image from the Facebook UI, the viewer appears with the low thumbnail version (or a slightly larger version of the thumbnail) loaded. Because of browser caching, that low quality image will display very quickly. Then in the background, they use javascript to load the higher quality image. Then using some javascript events, they can detect when the higher quality image has loaded. Once loaded, replace the lower quality version with the higher quality version of it. So from the UI perspective, it's only Javascript. When you upload the photo, they create multiple sizes of the image to allow this effect to happen.

Categories : HTML



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