I am displaying image by setting the source of an Image element directly to an URI.
Like
But for security purpose now the URI has a cookie attached with it.
Can someone please tell me if it is possible to attach cookie to a URI and display it in an image control in WP7?.
Thanks,
Kanaya
You'll need to download the image with WebClient and then assign the image directly after downloading it.
Related
Struggling to use the html2canvas-proxy for cross origin screenshots. As far as I understand, passing the url as a parameter(localhost:xxxx?url=https://...) returns the image screenshot data as a base 64 string (check blob).
This works only if the url parameter is an image source. On using any other url and using the same as an image source, I just get the alt text.
For example the proxy works with https://placebear.com/200/300 but fails to work with https://google.com as the url parameter.
Any help would be much appreciated
The html2canvas-proxy is only intended for use in combination with the html2canvas library itself. It's a NodeJS server with CORS enabled so that html2canvas can send the cross-domain image URLs to and receive the corresponding base64 data URL for processing in the canvases.
It doesn't work as a server that takes in a website URL and returns a screenshot of that website.
I am trying to create my first iframe tab in Facebook. Every time I try to add in a photo code (it is http and shows up properly in preview) it tells me it must be https, so I change it manually and then it will only show as a broken thumbnail file in the preview? Frustrated! Help please!
I just added an OpenGraph image to a site I'm working on and using the FB Debugger the info retrieves the correct image, however when sharing the url I still see default images being displayed (there was no specified OG image before). Is there something I'm missing here? The site uses a custom Python based framework and image is served via gzip from an Amazon EC2 instance, if that would affect the output in any way.
The problem is not with your website.
Facebook takes some time to refresh images inside facebook.com even though you can see the changes on Facebook Debug Tool.
In order to view your new image inside Facebook you can do two things:
Manipulate a little the URL you are trying to share, this way
Facebook will fetch the open graph data again.
Just give it some
time, it will be refreshed after a few hours.
There are three way to change your image you need to clear the
1) Manually clear facebook catch using the https://developers.facebook.com/tools/debug/ facebook tool
2) Add version code end of the url like ?v=1
3) write the GraphAPI code from when you click on the share button it will clear the facebook page cache.
this may be a stupid question.. but i decided to give it a try here...
i am developing a web application using AJAX to do the interactions between client and server(python/django).
now in the client page, there is a canvas which contains a dynamically generated image; i want to get this image and send this image to server, however, i can't use Canvas.toDataURL() due to the violation of canvas security rule (client and server must be in same domain in this case).
so I am just wondering whether it's possible to get the canvas element and send its HTML back to server, then let server process it and extract its image data?
appreciate any advice!
The only problem if the <canvas> date is tained by using images from different origins (CORS problem).
Just
Use toDataURL() to get the image data
Post this data to the server using normal AJAX
Strip off data URL prefix
base64 decode the data
Now you have image data in binary format
Do whatever you wish with the image
base64 + dataURL decode example: https://github.com/miohtama/Krusovice/blob/master/bin/create_bg_thumbnails.py#L62
now i'm making application for facebook with javascript.but I don't know method to change my screen application to .jpg file.
So,I would like to know how to change my application and post it
Thank you for your help.
You cannot get the screenshot done client side, however you can grab the HTML code of the page being viewed and AJAX it up to your server, have your server component transform that HTML into an image.
Use this to get the HTML content of the page at the moment they want the screen capture document.getElementsByTagName('html')[0].innerHTML;
AJAX the HTML to your server
Have your server transform that HTML into an image (depending upon server-side technology you're using, there are solutions to this) (eg http://www.converthtmltoimage.com/)
two choice, store the image on your server to be the permanent place sending back the new URL for the image, or send the content back to the client.
Have the client HTTP Post the image content to Facebook for the post, or reference the URL
It's a big project, but I commend you for tackling something like this.