Call Facebook with base64 image + text

Hello

I'm trying to share an image (from the extension of the screenshot) to Facebook without saving it to disk. I would also like to be able to include the text and a photo in the invoke call. Unfortunately, while I have an image valid base64 (renders correctly with "window.open" and I can call it to facebook with text only, I'm unable to invoke the image in base64. Pointers would be greatly appreciated!

function ss() {

    var options = {dest:'data:', mime:'image/png'};
    var screenshot = community.screenshot.execute(options);

    // check result
    if(screenshot.substr(0,5)=="data:") {

        // Pixastic assumes the image is in an img tag
        var oImg=document.createElement("img");
        oImg.setAttribute('src', screenshot);

        // crop the image
        Pixastic.process(oImg, "crop", { rect : { left : 0, top : 0, width : 100, height : 100 } }, function (oCanvas){ 

            // this works perfectly, so the image is good:
            // window.open(oCanvas.toDataURL()); 

                // this works, so invoke permissions must be right:
                /*
                blackberry.invoke.invoke({
                    target: "Facebook",
                    action: "bb.action.SHARE",
                    type: "text/plain",
                    data: "some text"
                }, function() {console.log("FB SUCCESS!");}, function() {console.log("FB ERROR!");});
                */

                // no amount of munging with this will work (e.g., using 'data' instead of uri):
                blackberry.invoke.invoke({
                    target: "Facebook",
                    action: "bb.action.SHARE",
                    type: "image/png",
                    uri: oCanvas.toDataURL()
                }, function() {console.log("FB SUCCESS!");}, function() {console.log("FB ERROR!");});
            });
    }
}

I am told that Facebook filters only look at the files.

If you write in the directory/tmp, it is supported by the RAM, which should alleviate most of the performance issues.

Tags: BlackBerry Developers

Similar Questions

  • When I play a game on facebook called words with friends, my computer freezes the game after a few movements.

    original title: computer freezes

    When I play a game on facebook called words with friends, my computer freezes the game after a few movements.  Why?

    Hi ileendunman,

    1. have you done any hardware changes or software on your computer before this problem?

    2. what browser do you use?

    If you use Internet Explorer, you can follow this link & check if the problem persists:

    The problems of games online using Internet Explorer

    Hope the helps of information.

  • How to get the text to change with each image in the slideshow base

    Hi, I'm putting the different positions and text on three different images. When I saw the text just remains the same.  I tried to change individually, but it doesn't seem to work. I took images in Photoshop and make all the same size with compensation for the text to be included later in the Muse. Then I loaded the three images in the slide show and thumbnail to bring the image before and at the Center. But regardless I the title and text appear unchanged, even if the changes to the image.  I don't know what to do with the image and text together in Photoshop would do anything for type resolution when it was introduced to the Muse.  Any ideas please.  I enclose the schema where I wish to address three different types of job seeker.slide problem.JPG

    Hi brush them... you have checked the title text on your widget option?... Try again with different slidshows which shows the option.so of text you can add the text you want in each image/trigger...sorry my English and I hope to help you

  • "Draw the fate-in" function fills the erroneous part of the text with the image.  How to reverse?

    Hi there and thanks for the help in advance!

    I used a font called "postcard from holidays NF.  (Police of holiday card mailing NF by Nick Fonts - FontSpace)

    I'm trying to put an image in the white part of the police, but when I use the function "match zero" and place the image, it fills in the black part of the police instead, that I would stay black.

    How to choose the other portion of the police (white part) to be filled with the image?

    Here is an example of what happens.  Thanks again!

    Untitled-2.gif

    For a policy like that, you will need to separate forms of letter (white) from their shadows. It will, therefore, describe the type and transparent records release.

    A new compound of all the white letters and use it as a clipping mask.

  • Text of Center with the image next to it.

    I want to have a centered text and just to his left a picture which is an icon.

    I'm sure that's a very basic question, but while I can understand a few methods which almost achieve this, im not sure of the right way to do it.

    Can I Center the text with text-align: center, but this is not applied to the image.

    I can make the text in a div with padding on the left equal to the width of the image, and then set the image as a background image that appears on the left. I can then use margin: auto to center the div, but only if I specify a width for the div If I do this, then the text is not exactly centered on the page. If I do the fairly large div and add text-align: center, then the text is centered, but the image is not always in the right place.

    Is there a solution?

    Thank you

    Hello

    Yes, the solution was obvious, and it was only when I was witting that I realized that I had been focused on centering the text with an image to the left and not with an image just to the left of the text, sorry my mistake!

    What I usually do to allow resizing of the text is to allow for a value up to 150% of my setting specified in the design police (not always possible, but I'm trying!), and anything above that allow the text overflow-spaces for this: nowrap; a rule that I had in the #header css rule.

    PZ

  • To create a ToolTip text for the image with multiple image map links

    Hello

    RH6 using, that I imported a picture into a topic. For the images that I have created several maps image to post a link to other topics. However, I can't create a map image additional to that same image that includes only the screen Tip text. I get a message of invalid value: "Please select a file, bookmark or topic to bind the hyperlink to.»

    Is there a way to create a popup only the text of an image with multiple image map links? My final output will be to WebHelp but possibly migrate FlashHelp in the near future.

    Thank you

    FMnRH



    Thank you
    FMnRH

    If the image is at the beginning of the subject, or all alone in a reference topic, you can put "#" (without the quotes) as the link for each area reactive.

    If the image is larger than the viewing window, it can jump to the top, but only if the user clicks on the link.

    I tried wz_tooltips and like it. I agree with Leon, it will take time for the first image but maybe go faster later.

    Harvey

  • Invoke the hand image + text

    What you set the mimetype when you want to share an image, but also have a text to go with the image. Keeping to "image/jpeg" and just help you add on a text of the query attribute?

    query {
                mimeType: "image/jpeg"
                invokeActionId: "bb.action.SHARE"
                uri: _dirPaths.asset + "images/MissScarlett.png"
            }
    

    This has been asked several times before and it is not possible.

    Previous discussions...

    http://supportforums.BlackBerry.com/T5/native-development/how-to-share-image-and-text-to-Facebook-an...

    http://supportforums.BlackBerry.com/T5/native-development/share-text-and-photo-for-the-same-invocati...

  • working with color images

    Hello

    I am stuck on this program, I can't seem to understand.

    can someone guide me in the right direction please.

    I did this program, and it is properly take a reference image and other images rotated and attract crosshair while the images are shot.

    It works.

    but when I put a COLOR image instead of the image in grayscale. It does not work. It gives me the error.

    can someone help me with this please

    I have to build the vision of this script Wizard

    It seems to work with grayscale images and not the COLOR PHOTOS.

    What can I do to make this work?

    I need to work with images like this and I have to call reticle around the BLACK POINT on the left corner.

    I also have a sample VI created vision Assistant?

    In the wizard of vision follow this

    This, if your original image is a RGB one.

  • Upgrade Windows 10: error called "LogonUI.exe - bad Image C:\Windows\system32\LMIinit.dll.

    I have a Windows 7 Fujitsu Lifebook (5 years). I tried to update to Windows 10 without success. Finally after a Windows7 update and then upgrade Windows 10. Success! Remotely, the company THAT THIS guy decided that I had to update W10, now all I get is "failure in the snp nonpaged area - uvc.sys" the laptop then restarts auto and trying again and again. Looking at updates successfully I see there's a Windows 10 call successful as well as failed. I did a reset to, but who brought me back to Windows 7.  That's life.  However, when I close I now get an error called "LogonUI.exe - Bad Image C:\Windows\system32\LMIinit.dll if the other is not designed to run on Windows or it contains an error." Try to install the program by using the original installation media".

    With all the man hours spent the last week and a bit on this point, I have to stay on Windows 7 and when the thing dies completely invest in a new (if my boss allows me)!

    This my friends, is his last chance, can someone help me.

    Kind regards

    Sue

    Hello

    I realize has the inconvenience that you are experiencing with the installation of Windows 10. I will definitely help you with this.

    I suggest you refer to the suggestion created by Andre Da Costa in the link mentioned below:

    http://answers.Microsoft.com/en-us/Insider/wiki/insider_wintp-insider_install/how-to-fix-Windows-10-setup-failure/eba3c864-d9fe-4F8E-9468-81b1f89473ed

     

    Hope this information helps.

    Please get back to us with an update on the issue, we will be happy to help you.

  • problem with resize image

    Hello

    I want to resize the image when running according to the display width.

    I try some code below, but it shows me the white screen.

    class image extends screen
    {
    EncodedImage bit;
    BMF BitmapField;
    image()
    {
    try {}
                    
    BMF = new BitmapField (Bitmap.getBitmapResource ("next.png"));
    bmf.setImage (bit.scaleImage32 (50,50));
    Add (BMF);
    }
    catch (System.Exception e)
    {}
                
               
    }
    }

    Hey hardikkhamar,

    Hey man, how do you think that this code is useful when dealing with the image url using http call?

    Please Reffer to the code once more... its for the local image that is in your res folder...

    you have loading.png image, right?

    then get image coded this bitmap to aid

    PNGEncodedImage encode = PNGEncodedImage.encode(Bitmap.getBitmapResource("loading.png"););
    

    and then going on to encode this method with the width and height required... its that simple man...

    Bitmap Resizedbitmap = setsizeImage(encode, 200,150);
    

    Not to say thanks, Press the congratulations on the right side to thank the user who has helped you.
    Please mark as resolved messages if you found a solution.

  • APEX 5.0. With the image stored in a BLOB gives ORA-06502.

    Hello

    I want to create an interactive report - computer desk with an image that is stored in a BLOB but it a: returnes ORA-06502: PL/SQL: digital or value error: character of number conversion error.

    I created a test with only the image report (charged - which is a BLOB) and an ID (PK - one number from a sequence)

    SELECT ID, invoice of foto

    I tried with and without a formatmask for the ' 999999999999999 ID' and the Type of plain text, because it seems not to be a better choice...

    For the Type 'pay' is 'View Image' and the 'Table name' and 'BLOB column' are defined. 'Primary Key column 1' set ID 'column of Type mime"points to a field that contains" image/jpeg", as the stored image is a photo in format jpg.

    The image from a Forms application displays OK.

    DB is a 11.2.0.4 on Linux 6.6 and APEX is 5.0

    What did I miss?

    Thank you

    Dino

    Dino Hustinx wrote:

    I want to create an interactive report - computer desk with an image that is stored in a BLOB but it a: returnes ORA-06502: PL/SQL: digital or value error: character of number conversion error.

    I created a test with only the image report (charged - which is a BLOB) and an ID (PK - one number from a sequence)

    SELECT ID, invoice of foto

    As described in the documentation, the report query selects the length of the BLOB, not the column itself column:

    select id, dbms_lob.get_length(billed) billed from foto
    
  • PROB WITH SCROLLING OF TEXT; EM DOES NOT

    I have problems with the scrolling text. I placed a large jpeg image. I want to create a scrollable text on it, so I made a layer for it. Also, I went to paste and onboard in the Panel preferences and changed in 1024px for the horizontal version. Now, I put the text on the Board of directors passed and with the same name, I also created a layer of Caontainer where I made a box on the active Board Indseign and put this layer where I created the image with the same name. Now when I save and go to the overview folio my scrolling text does not work.

    What I need to do something in overlays or something In Design

    Looks like you might be trying to do scrolling text in original, exceeded the way that we had to do in the first days of DPS.

    This link will take you to a step by step guide on the DPS help page:

    http://helpx.Adobe.com/Digital-Publishing-Suite/help/scrollable-frame-overlays.html

  • How to work with still Images in first items 10

    I am faced with still images in my titles for my video project and would be really grateful for the help. I did a lot of searching on Google on this and searched this forum, but can't seem to find the answer I need, maybe not to seek the right questions or all just "don't get it".  Not even PE Adobe tips or Adobe TV covers, although it seems important to know. I don't understand how PE10 will manage the resolution of graphics from Photoshop or any fixed image. Maybe this topic will also contribute to other institutions.

    I'm working on a video project for my work, editing an old training video. New title graphics created in Photoshop, inserted images of title integrated with video clips, then exported the video segments in the form of MPEG files.  I burned the entire video on DVD.

    When the final DVD play on a computer or a television screen, the images of photo in the titles are unclear, although they were clearly 300 dpi images. (I know dpi is not serious in the video). The text of the title is also a little fuzzy and the text of the title which has applied animation to it is still more unclear. Yet, old video clips MPEG look good - it's just my title images and texts that have (annoying) look bad.

    So I need to know how to improve the quality of the images/graphics even a video?

    Project settings:

    -Hard drive, Standard 48 kHz

    -Editing mode: DV NTSC

    -Frame: 720 x 480 (0.9091)

    -Frame rate: 29.97 FPS

    -with "optimize images" box checked

    Using these settings because I work with an old training video CD MPEG files.

    Exporting files: MPEG, NTSC DVD Standard

    I export as MPEG video clips because they will be burned on a CD or a DVD for distribution to our management offices.

    Job details:

    In Photoshop, I still created graphic images for each title of format 720 x 480 with high resolution photos and logo of the company (300 dpi) and save as a bitmap for import into PE10.  In the timeline panel, I insert the fixed image on the track "Vidéo 1", and then in the video track 2 create a top for the text title (some animated, some still). Sometimes I have the battery 2 or tracks of three titles with separate video text on an image fixed title. Yes, there is a red line on the top in the timeline because I do not still images.

    Issues related to the:

    • What is the best resolution for images imported into PE10 of Photoshop?

    • Do I create title graphics/images to 720 x 480 or higher like 1920 x 1080 report so it will show better seen on a computer or a TV?

    • Do I need to render each image title in the timeline panel so that it displays finally better in MPEG?

    • Is it better to create a title and then insert the image in the title so that they are integrated, rather than layers on separate video tracks?

    I would be very happy to help.

    When the final DVD play on a computer or a television screen, the images of photo in the titles are unclear, although they were clearly 300 dpi images. (I know dpi is not serious in the video). The text of the title is also a little fuzzy and the text of the title which has applied animation to it is still more unclear. Yet, old video clips MPEG look good - it's just my title images and texts that have (annoying) look bad.

    Please keep in mind that DVD-video has been designed for CRT TVs, and was a major step upward to a VHS tape. However, when displayed on a HD or HD TV computer monitor *, it of always ONLY 720 x 480, with is about 1/4 of the resolution 1920 x 1080, which is what we're used to seeing on display devices. It is, but only 25% of the quality. He can never look as good as HD material.

    Good luck and if I missed something, please point out to me.

    Hunt

    * With the advent of BD players and players of DVD up-rezzing, things HAVE improved, watching a video DVD on an HDTV. New players have up-rezzing in chips, which do a very good job of "improving" the quality of the material considered. However, even with these amazing chips, DVD-video is NEVER as good as a full-HD source. In addition, the computers do not have these chips up-rezzing, so when contemplating a video DVD on a high-resolution computer monitor, it will still look pretty bad. There are a couple of new DVD players software, that allow to improve the quality of DVD-Video, played on a high-resolution computer monitor, and some look quite promising. I guess we'll see some more development in the region of DVD-video, especially since BD is not the seller basically promised a lot. Even in 3D is not helping BD fulfilling its promises.

  • How can I set up a list of the Figures with the extra text?

    I am writing my thesis Art History, which includes a large group of figures at the end.  My Counsellor asked that I caption images, but also provide a list of Figures before starting the actual pictures.  I got this far - I use the Table of contents feature for automatically numbered captions and then back up the text of the legend to the list of Figures.

    Here's the rub: I need to include information on where I got the pictures I use attribution, but only in the list of figures.  My Adviser has specifically requested that I don't include this information in the captions as he felt that it cluttering up the images.  How can I include small amounts of text (for example "after Jones 1987, Fig. 22") for hundreds of images in the list of Figures without putting this info in the legends themselves?

    Of course, just by typing the information in the list Figures does not - as soon as the list is updated the extra text is deleted.  I've been playing with the hidden layers, but when I create a new layer mask with blocks of text, the numbering of the original layer is disrupted.  Any ideas on how to keep numbers and include additional information in the list of Figures without adding it to the visible caption? I would be very grateful for any help.

    Maybe at the end of your legend, in a [None] color text, 0.1 pt size? Do not put in a separate paragraph, because you have to pick this up as well for your table of contents. To change this little invisible text, you can use the story editor.

    (And I'm far enough, which suggests making it conditional text, that you would normally hide, have it show only when you generated the list of Figures, before some awake dormant brain cells and required attention.)

    "Course it would work - you would get the extra text in your list, and if you hide conditional text once again, your document is reversed 'normal' State." However, what makes the conditional text visible can cause your text reformattingand so your regular content would be nice but the list of Figures - generated with more text in your document! -could be shifted a few pages...)

  • Rollover: change of image + text adds?

    I am very new to Dreamweaver, and what I thought would be very simple became slower! I thought I would post to ask if what I'm looking for is possible, or rather - get advice on what he looking to achieve.

    Joined a typical picture of my site. I have big buttons consisting of a big button with a title in it. Now, what I would 'prefer', is that your mouse above this box, the copy (together as a real copy, not an image) appears - I mean copy the descriptor text.

    I understand the bearings of base, but do not know how to do this, or what to research to find out. Essentially, if I place an image in a table, can I place text above and get this effect?

    ANY advice would be greatly appreciated, I continue with my tutorials, but would like to know nexactly what you have to get there faster. Thanks in advance!Picture 1.png

    I think you want a ToolTip. First of all, let me say that I prefer to use CSS style text links for navigation instead of Images. The text is readable by search engines, translators and screen readers.  The images are not readable.

    The easiest way to add a ScreenTip to a text or image link is with the title attribute.

    image descriptionwidth title = "learn more about our widgets" = "XX" height = "XX" >

    title = "click here to learn more about our widgets"> Link Widgets

    If you want something fancy with fades, images, etc... use a Script of the ToolTip as the site of Walter Zorn.

    http://www.Walterzorn.com/ToolTip/tooltip_e.htm

    Hope this helps,

    Nancy O.
    ALT-Web Design & Publishing
    Web | Graphics | Print | Media specialists
    http://ALT-Web.com/
    http://Twitter.com/ALTWEB
    http://ALT-Web.blogspot.com

Maybe you are looking for