Facebook api question

is it possible to post a like on an element on facebook as the current logged in user in an as3 application?
Facebook.api(likes) does not work...

http://labs.byhook.com/2010/08/03/facebook-like-button-in-flash/
or
you can do it by using intermediate javascipt (have never tried, but is possible)...

Similar Messages

  • Facebook API Login with the login window loaded in html component

    I am making an air app which utilises net based content such as bringing viewing their facebook photos within the app itself but I DON'T want my users to be able to browse to the internet or more specifically open up internet explorer. Problem is the facebook api requires the user to go to a facebook login page when the login for the facebook session is fired. Is there any way I can ghet this to open up in a html component rather than internet explorer? The facebooksession.login() seems to open up this window by default and doing the validatelogin without this seems to throw a null object reference error.
    Can anybody help please? Here's my code:-
    public function facebookLoginButtonClick():void{
    facebookSession = new FacebookSessionUtil("blah","blah",stage.loaderInfo);
    facebookSession.addEventListener(FacebookEvent.WAITING_FOR_LOGIN, facebookHandle_waitingForLogin);
    facebookSession.addEventListener(FacebookEvent.CONNECT, facebookHandle_connect);
    facebookSession.login();
    private function facebookHandle_waitingForLogin(event:FacebookEvent):void{
    var facebookAlert:Alert = Alert.show("Click OK After You've logged in to Facebook", "Logging In");
    facebookAlert.addEventListener(Event.CLOSE, facebookHandle_close);
    private function facebookHandle_close(event:Event):void{
    facebookSession.validateLogin();
    private function facebookHandle_connect(event:FacebookEvent):void{
    var facebookCall:FacebookCall = facebookSession.facebook.post(new GetInfo([facebookSession.facebook.uid],['name', 'pic_square']));
    facebookCall.addEventListener(FacebookEvent.COMPLETE, facebookHandle_getInfoComplete);
    private function facebookHandle_getInfoComplete(event:FacebookEvent):void{
    var facebookGetInfoData:GetInfoData = GetInfoData(event.data);
    var facebookUser:FacebookUser = FacebookUser(facebookGetInfoData.userCollection.getItemAt(0));
    facebookUserAvatar.source = facebookUser.pic_square;
    facebookUsername.text = facebookUser.name;

    Try this:
    public function FacebookInterOp(loaderInfo) {
                session = new FacebookSessionUtil(API_KEY, SECRET, loaderInfo);
                session.addEventListener(FacebookEvent.CONNECT, onConnect);
                fbook = session.facebook;
                if (loaderInfo.parameters.fb_sig_session_key) {
                    session.verifySession();
                else {
                    session.login();
    You'll still get the pop up when you load the program in the debugger, but when loading from Facebook it should be seamless. I hope that helps.

  • Question about flex with facebook api

    I want to use flash with facebook,when it visit a url,it will use JSON to decode data,when it contains connection,I hope it can display button which named "show" or "hide"
    AS code is follows:
    public function CustomGraphContainerController(a_graphControlContainer:GraphControlContainer)
       super(a_graphControlContainer);
       var loader:URLLoader=new URLLoader();
       var request:URLRequest = new URLRequest();
       var variables:URLVariables = new URLVariables();
       request.url = "http://localhost/api.jsp";
       variables.metadata = 1;
       request.data = variables;
       loader.addEventListener(Event.COMPLETE,onGraphDataLoadComplete);
       loader.load(request);
    private function onGraphDataLoadComplete(a_event:Event):void{
       var loader:URLLoader=a_event.target as URLLoader;
       var graphData:String=loader.data;
       var decodedJSON:Object = JSON.decode(graphData);
       if (decodedJSON.data) {
        var graphList:GraphList = new GraphList();
        var childGraphObject:GraphObject;
        for each(var childObject:Object in decodedJSON.data) {
         childGraphObject = new GraphObject();
         for (var childKey:String in childObject) {
          childGraphObject[childKey] = childObject[childKey];
         graphList.addToList(childGraphObject);
        graphList.paging = decodedJSON.paging;
        this.renderGraphList(graphList);
       else{
        var graphObject:GraphObject=new GraphObject();
        for(var key:String in decodedJSON){
         graphObject[key]=decodedJSON[key];
        this.renderGraphObject(graphObject);
        trace(graphData);
    the return codes from url,like follows:
    "id": "204603129458_127056137323572",
    "from": {
      "name": "Packt Publishing",
      "category": "Products_other",
      "id": "204603129458"
    "message": "The Amazon SimpleDB Developer Guide has been published!Get your copy now! http://bit.ly/blFQUG",
    "created_time": "2010-06-04T12:39:44+0000",
    "updated_time": "2010-06-04T12:39:44+0000",
    "data": [{
      "name": "Packt Publishing",
      "connection":"https://graph.facebook.com/packtpub/feed",
      "id": "204603129458"
    "connection": {
      "feed": "https://graph.facebook.com/packtpub/feed",
      "posts": "https://graph.facebook.com/packtpub/posts",
      "tagged": "https://graph.facebook.com/packtpub/tagged",
      "statuses": "https://graph.facebook.com/packtpub/statuses",
      "links": "https://graph.facebook.com/packtpub/links",
      "notes": "https://graph.facebook.com/packtpub/notes",
      "photos": "https://graph.facebook.com/packtpub/photos",
      "albums": "https://graph.facebook.com/packtpub/albums",
      "events": "https://graph.facebook.com/packtpub/events",
      "videos": "https://graph.facebook.com/packtpub/videos"
    "likes": 1
    When I run above code,it only display "Pop Out" button,it don't display show or hide button, why?  How to correct above code to display "show" or "hide" button?
    Thanks

    Hi saeed,
    For building Berkeley DB on Windows XP, you can find the documentation here: http://www.sleepycat.com/docs/ref/build_win/intro.html
    Windows FAQ also contains helpful information: http://www.sleepycat.com/docs/ref/build_win/faq.html
    You have just to install Berkeley DB, in order to use C API. Please, be aware that you have to link against the release build, after you built it.
    Regards,
    Bogdan Coman, Oracle

  • Iphone facebook chat question

    I just bought the iphone 4 yesterday so i really dont know much about it. the question i have is with the facebook chat is there a way for the chat to save on there. cuz i was talkin to someone and than went to the main screen and went back in when they wrote back and what we previously talked about was gone. is there a way to save the chat on there. or exit the facebook app without closing it?

    I'm not entirely clear on what exactly you are asking. I'll help you as best I can.
    If you are in FB and get a vibration (someone initiated chat) and you go to the FB menu page and tap chat and enter the conversation you are chatting with that person. You can then tap the FB menu button and do other things like check your newsfeed/friends' pages/your profile, etc. As you are doing so you can continue to toggle between the chat and other functions within FB and your chat should remain.
    However, I've noticed that if I press the home button and "close" FB and then return to FB...the chat is gone. My assumption would be it clears the previous chat out in order to not slow the iPhone down with multiple tasks constantly being performed without user interaction.
    While the iPhone 4 multitasks, I don't believe you can actually "close" FB and return to the program to your previous chat.
    **By close, I do not mean to log out of fb...just tapping the home button and being taken back to your home screen.
    Does this answer your question?

  • Fetch Data from Face Book using Facebook API

    HI,
    I am working on .NET application to fetch user/friend details from face book using API. I am expecting the user details such as
    user_photos,email,user_location,user_birthday,first_name,last_name,gender.
    I can able to find the values for first_name, last_name, gender only.
    I couldn't find the values of user_photos, email, user_location, user_birthday.
    I have used the URL below to fetch data :
    string
    url = @"https://graph.facebook.com/"+
    fbUserId + "?fields=first_name,last_name,email,gender&method=GET
    Please suggest me to retrieve the remain values.
    Thanks in Advance.
    Pearl

    Have you opened the sample in
    https://github.com/facebook-csharp-sdk/facebook-windows8-sample ?
    I read the code is close what you need actually.
    chanmm
    chanmm

  • API Question

    Does the configurator provide a means of accessing the PS API..? I was contemplating createing a UI using C#/C++ or Delphi and COM but if this tool will give me the UI ability while exposing the SDK API for PS then that would be prefered. I looked through the threads and didnt see this question, apologies if its a dupe.
    Also, is there an example of running scripts and actions for PS from a UI element created with the configurator...?
    Thanks
    David

    Hi David,
    may I suggest you to get a look to the Photoshop Panel Developer's Guide here:
    http://www.adobe.com/devnet/photoshop/pdfs/photoshop_panel_developers_guide.pdf
    It gives you advices and examples on how to build photoshop panels in Flash/Flex (with Flex you've plenty of UI element to play with - sliders, drop down lists, etc). I don't think you need patchpanel, or at least I've been able to do my own stuff without it: I've some javascript functions that are called by the panel depending on few sliders and checkbox.
    Anyway, something that prooved to be impossible without writing some temporary image files and managing in fancy ways the input-output stream is to embed in the panel a PixelBender kernel - something that would make the panel a close brother of a Photoshop plugin
    Regards,
    Davide Barranca
    Bologna, Italy

  • Swing API question

    hello.
    my name is james mcfadden and i am a final year computing student at letterkenny IT in ireland. i have a program here that i want you to take a look at. i am using this program among many programs in my final year project. the program compiles and runs. but when it compiles, i get a message from the jGRASP compiler (which always works well for me) saying that i was using a depracated API function. i found out what that depracated API function was. it was the show() function. this function was used in version 1.4.2 of java, but was dropped out of java 5.0. i checked up the java 5.0 API on the web and discovered that the show() function had been replaced by the setVisible(boolean b) function. i don't know how to use this new API function in my code. the question that i have to ask you is: how do i replace the show() function in my code with the setVisible(boolean b) function? Below is the code and the result i got back from the compiler when i compiled the code. thank you very much for your help.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    class LogOn extends JPanel{
       private static JTextField username=null;
       private static JPasswordField password=null;
       private static JButton button=null;
       public LogOn(){
          setSize(260,160);
          username=new JTextField(15);
          password=new JPasswordField(15);
          JLabel usernameLabel=new JLabel("Username: ");
          JLabel passwordLabel=new JLabel("Password: ");
          add(usernameLabel);
          add(username);
          add(passwordLabel);
          add(password);
          show();
          button=new JButton("Ok");
          add(button);
          button.addActionListener(new ButtonListener());
          JFrame frame=new JFrame("Welcome to Home Entertainment");
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          frame.add(this);
          frame.pack();
          frame.setVisible(true);
       private class ButtonListener implements ActionListener{
          public void actionPerformed(ActionEvent e){
             try{
                Demo d = new Demo();
                d.getChoice();
             catch(Exception ex){}
    }----jGRASP exec: javac -g X:\CP4B Project\LogOn.java
    Note: X:\CP4B Project\LogOn.java uses or overrides a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.
    ----jGRASP: operation complete.

    Hi James,
    your class extends JPanel. JPanel inherits show from java.awt.Component. If you have a look at the API documentation. The extension path of JPanel is
    java.lang.Object
    java.awt.Component
    java.awt.Container
    javax.swing.JComponent
    javax.swing.JPanel
    javax.swing.JComponent has a method setVisible(<boolean>). That means JPanel has all methods,that are Implemented in JComponent
    So (although I have not yet used it)
    replacing
    show() ;
    by
    setVisible(true) ;
    in your code should do the trick...

  • JDeveloper10g VCS Extension API Question

    Hi.
    I wrote a VCS system for JDeveloper9.0.3 against Microsoft Visual Source Safe, which worked fine. We've now upgraded to 10g, and this system does no longer work, because the JDev's extension API has changed.
    I'm therefore rewriting the system to support the 10g API. But I'm a bit overwhelmed by the changes made to the API. Where do I start?
    1. I wish to implement a new panel in JDev's preferences screen under VersionControl systems which can configure my plugin.
    2. I wish to present files in the Navigator window with overlay icons on files checked in, checked out, not present and such.
    4. I wish to add my plugin to the context menu for the Navigator, so that users can be presented with the choice to perform file operations against VSS.
    3. I wish to present one dialog for single file operations and one for multiple file operations.
    Which classes do I need to extend? Which interfaces do I need to implement?
    Can someone give me directions? The help file for the extension API does not give sufficient answers.

    To answer your other questions:
    The VCSPropertyCustomizer object I've written contains properties I need to use during any VSS operations. Does the IDE store these properties in an easily retrievable place, or do I need to handle this myself.
    You can get a VCSPropertyMap from the Ide like this:
      ((VCSPropertyMap)Ide.getSettings().getData( YOUR_DATA_KEY );
    And another thing, the example above does not describe dialogs on operations like checkin, checkout and so on.
    Would this be implemented in the doitImpl() method in my implementation of VCSAbstractCommand?
    Yes... Below is a snippet from the code for the ClearCase client.
    FWIW, sorry it's so much work to do this. I'm working on an (optional, i.e won't break existing code) way of just writing a simple xml file to integrate version control clients into JDeveloper that should hopefully make everyone's life easier in the future :P
      protected int doitImpl() throws Exception
        final Collection nodes = getNodesToCheckIn();
        if ( nodes.size() <= 0 )
          return NOOP;
        if (! saveDirtyDocuments( nodes ))
          return Command.CANCEL;
        final Map timestampMap = VCSBufferUtils.storeTimestamps( nodes );
        final VCSDirectoryInvokableState invokableState =
            new VCSDirectoryInvokableState( VCSModelUtils.convertNodesToURLs(
                nodes ) );
        final VCSCommandState state = new VCSCommandState( invokableState,
            timestampMap );
        if ( context.getView() instanceof ClearCaseChangeListWindow &&
          !((ClearCaseChangeListWindow)context.getView()).isUsingCheckInDialog() )
          return checkInSilently( nodes, state,
            ClearCaseClient.getInstance().getChangeListCustomizer() );
        else
          return checkIn( nodes, state );
      protected void noOpImpl() throws ClearCaseValidationException
        throw new ClearCaseValidationException(
            ResourcePicker.get().getString( "ERROR_CHECKIN_FILTERED_TITLE" ), //NOTRANS
            ResourcePicker.get().getString( "ERROR_CHECKIN_FILTERED" ) ); //NOTRANS
      private int checkInSilently(
        final Collection nodes,
        final VCSCommandState state,
        final VCSOptionsCustomizer customizer )
        Ide.getWaitCursor().show();
        Runnable r = new Runnable()
          public void run()
            try
              doCommitOperationImpl( Ide.getMainWindow(), customizer.getOptions(),
                state );
            catch ( Exception e )
              getExceptionHandler().handleException( e, Ide.getMainWindow() );
            finally
              EventQueue.invokeLater( new Runnable()
                public void run()
                  Ide.getWaitCursor().hide();
                  postCheckIn( state );
        Thread t = new Thread( r, "ClearCase Check In Committer" ); // NOTRANS
        t.start();
        return OK;
      private int checkIn( final Collection nodes,
          final VCSCommandState state )
        throws Exception
        boolean multiCheckin = ( nodes.size() > 1 );
        final VCSOptionsCustomizer customizer =
            new VCSCommentsCustomizer( new ClearCaseCheckinCustomizer(),
            multiCheckin );
        if ( getContext().getView() instanceof ClearCaseChangeListWindow )
          customizer.setOptions(
            ClearCaseClient.getInstance().getChangeListCustomizer().getOptions()
        final JEWTDialog dialog = VCSComponents.createOperationDialog(
          VCSWindowUtils.getCurrentWindow(),
          ResourcePicker.get().getString( "CHECKIN_CAPTION" ), //NOTRANS
          ResourcePicker.get().getString( "CHECKIN_LONG_PROMPT" ), //NOTRANS
          VCSComponents.createFileListerComponent( nodes ),
          customizer.getComponent(),
          "f1_clearcasechkin_html", //NOTRANS
          customizer.getInitialFocusComponent()
        Map options = null;
        if ( ! multiCheckin )
          String checkoutComments = retrieveCheckoutComments( ((Locatable)nodes.
              iterator().next()).getURL() );
          // bug 3067323 - check in dialog does not prepopulate with check out comments
          if ( checkoutComments != null )
            customizer.setOptions( Collections.singletonMap( KEY_SETTING_COMMENTS,
                checkoutComments ) );
        else
          customizer.setOptions( Collections.singletonMap(
              KEY_SETTING_REUSE_COMMENTS, _optionReuseComments ) );
        dialog.addVetoableChangeListener( new VCSDialogCommitter()
          protected final boolean doCommitOperation() throws Exception
            return doCommitOperationImpl(
                dialog, customizer.getOptions(), state);
        boolean dialogSuccessful = ClearCaseDialogRunner.runDialog( dialog );
        postCheckIn( state );
        _optionReuseComments = (Boolean)customizer.getOptions().get(
            KEY_SETTING_REUSE_COMMENTS );
        return (! dialogSuccessful ? Command.CANCEL : Command.OK);
      private void postCheckIn( VCSCommandState state )
        Collection processedUrls = state.getInvokableState().getProcessedURLs();
        if ( processedUrls.size() > 0 )
          VCSBufferUtils.reloadBuffers( state.getTimestampMap() );
        URLFilter filter = VCSURLFilters.createSpecificURLFilter(
          (URL[])processedUrls.toArray( new URL[0] ) );
        ClearCaseClient.getInstance().getStatusCache().clear( filter );
      private boolean doCommitOperationImpl(
          Component dialog, Map options, VCSCommandState state )
          throws Exception
        DeterminateProgressMonitor monitor = new DeterminateProgressMonitor(
          dialog,
          ResourcePicker.get().getString( "CHECKIN_PROGRESS_TITLE" ), //NOTRANS
          ResourcePicker.get().getString( "CHECKIN_WATCHER_DESCRIPTION" ), //NOTRANS
          0,
          -1
        final ClearCaseShellRunner runner = new ClearCaseShellRunner();
        List cmd = new ArrayList();
        cmd.add( "ci" ); //NOTRANS
        Boolean b = (Boolean)options.get( KEY_SETTING_IDENTICAL_CHECKIN );
        if (b != null && b.booleanValue())
          cmd.add( "-ide" ); //NOTRANS
        b = (Boolean)options.get( KEY_SETTING_REUSE_COMMENTS );
        String s = null;
        if (b == null || ! b.booleanValue())
          s = (String)options.get( KEY_SETTING_COMMENTS );
        URL commentFile = writeCommentsFile( s, cmd );
        runner.setCmdList( cmd );
        VCSDirectoryInvokable invokable = new ClearCaseDirectoryInvokable(
            state.getInvokableState(), ClearCaseUtil.FILE_COMMAND_BATCH_SIZE )
          protected final boolean doInvocation2( URL parent, URL[] invokeUrls )
              throws Exception
            String[] filenames = VCSFileSystemUtils.getURLFileNames( invokeUrls );
            runner.setDirURL( parent );
            runner.setOptions( Arrays.asList( filenames ) );
            doInvocationImpl( runner );
            return true;
        invokable.setProgressMonitor( monitor );
        try
          if (! invokable.runInvokable())
            return false;
        finally
          if ( commentFile != null )
            URLFileSystem.delete( commentFile );
        return true;
      private void doInvocationImpl( ClearCaseShellRunner runner ) throws Exception
        runner.exec();
        String error = runner.getErrorText();
        if ( error != null &&
             error.indexOf( "The most recent version on branch" ) >= 0 && //NOTRANS
             error.indexOf( "is not the predecessor of this version" ) >= 0 ) //NOTRANS
          throw new ClearCaseOperationException(
            ResourcePicker.get().getString( "ERROR_CHECKIN_FAILED_TITLE" ), //NOTRANS
            ResourcePicker.getPicker( ClearCaseOperationCheckin.class ).getString(
                "ERROR_CHECKIN_FAILED_SUBSUMED" ) ); //NOTRANS
        if (runner.getExitCode() == null ||
            runner.getExitCode().intValue() != 0)
          throw new ClearCaseProcessException(
            ResourcePicker.get().getString( "ERROR_CHECKIN_FAILED_TITLE" ), //NOTRANS
            ResourcePicker.getPicker( ClearCaseOperationCheckin.class ).getString(
                "ERROR_CHECKIN_FAILED" ), runner.getErrorText() ); //NOTRANS
      private String retrieveCheckoutComments( URL url )
        // bug 3067323 - check in dialog does not prepopulate with check out comments
        String[] cmd = new String[] { "lsco", "-me", "-fmt", "%c", "-cvi", //NOTRANS
            URLFileSystem.getPlatformPathName( url ) };
        try
          ClearCaseShellRunner runner = new ClearCaseShellRunner();
          URL parent = URLFileSystem.getParent( url );
          if ( url == null )
            return null;
          runner.setCmdArray( cmd );
          runner.setDirURL( parent );
          runner.setQuiet( true );
          runner.exec();
          String output = runner.getOutputText();
          if ( output != null && output.equals( "" ) )
            return null;
          return output;
        catch ( Exception e )
          oracle.ide.util.Assert.printStackTrace( e );
          return null;

  • Facebook app questions

    I have just a few questions: I have the iphone 5 and I'm curious if anyone knows what the default facebook notification sound is in ios6 because I've read where its the tri-tone, but I've recently got a message and it's not that tone. Is it also possible to change that notification tone?
    How many people have been having issues receiving notifications period because mine seem to not work at all all of a sudden.

    Settings>Sounds

  • Facebook app question

    Hey guys,
    Trying to get the Facebook app to display my pic on the home screen (login screen) of the app. When you sign in the first time, it used to create a "button" with your profile pic and name. You tap it to log in. Well, it works for everyone else, but for me, it's just a generic pic, and says "Facebook user." I've tried deleting &amp; re-downloading the app, checking my FB settings, but can't get it to work. Anyone else have is problem? Any ideas?
    Thanks!

    This doesn't answer your question but I find the Facebook app to be pretty poor, much better using the actual site through Safari in my opinion. You don't get notifications through the app do you?

  • How to stop facebook API

    I don't know why but everytime I use my Playbook a window pops up asking me to accept or decline an attempt to connect to API.Facebook.Com.  I always decline since I wouldn't trust facebook as far as I could throw it - but how do I remove this annoying prompt?  Accept is not an option.
    Solved!
    Go to Solution.

    it shouldn't.
    Have you restarted the Playbook since deleting it? Touch the battery icon at upper right > Restart.
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • GraphViz  API  Question

    I am looking for someone with experience working with the GraphViz API. Do you have experience working with GraphViz? If you are such a person, please say ?Hello? to prompt my question. Thank you. Mike

    Hi David,
    may I suggest you to get a look to the Photoshop Panel Developer's Guide here:
    http://www.adobe.com/devnet/photoshop/pdfs/photoshop_panel_developers_guide.pdf
    It gives you advices and examples on how to build photoshop panels in Flash/Flex (with Flex you've plenty of UI element to play with - sliders, drop down lists, etc). I don't think you need patchpanel, or at least I've been able to do my own stuff without it: I've some javascript functions that are called by the panel depending on few sliders and checkbox.
    Anyway, something that prooved to be impossible without writing some temporary image files and managing in fancy ways the input-output stream is to embed in the panel a PixelBender kernel - something that would make the panel a close brother of a Photoshop plugin
    Regards,
    Davide Barranca
    Bologna, Italy

  • E10 API Question

    Since we have in E10 Campaign Canvas and Program Builder, does the Step ID is unique between the two in any instance?
    Of course I am asking the question from an API perspective, so is it safe to assume Step ID (canvas or builder) will be unique per Eloqua instance?

    Correct, the StepID is unique per instance.  Does not matter if it's a PB step or a Canvas step.

  • JavaMail api question..

    I'am trying to send an e_mail to myself using the javaMail API.
    I have already installed it (and also the Java Activation Framework).
    The code is:
    import javax.mail.*;
    import javax.mail.internet.*;
    import java.util.Properties;
    import java.util.Date;
    import java.io.*;
    public class PruebaMail {
    public static void main(String[] argv) {
              try {
                   Properties props = new Properties();
                   Session sendMailSession;
                   Store store;
                   Transport transport;
                   sendMailSession = Session.getInstance(props, null);
                   props.put("mail.smtp.host", "SMTP.mail.yahoo.com");
                   Message newMessage = new MimeMessage(sendMailSession);
                   newMessage.setFrom(new InternetAddress("[email protected]"));
                   newMessage.setRecipient(Message.RecipientType.TO, new InternetAddress("[email protected]"));
                   newMessage.setSubject("Prueba 1234");
                   newMessage.setSentDate(new Date());
                   newMessage.setText("Le escribimos para informarle que alguien ha respondido a su consulta");
                   transport = sendMailSession.getTransport("smtp");
                   transport.send(newMessage);
              } catch (MessagingException e1) {
              System.out.println("PruebaMail MessagingException:" + e1.getMessage());
    .. but, issuing C:\>java PruebaMail .. I get this error:
    PruebaMail MessagingException:Sending failed;
    nested exception is:
         javax.mail.MessagingException: Unknown SMTP host: SMTP.mail.yahoo.com;
    nested exception is:
         java.net.UnknownHostException: SMTP.mail.yahoo.com
    so, my question is:
    1. What is wrong in my code. Do you know an available SMTP server which
    allows relaying??
    thanks in advance!

    Reverse this order:
    sendMailSession = Session.getInstance(props, null);
    props.put("mail.smtp.host", "SMTP.mail.yahoo.com");Any property should be set before getting a Session instance.
    If your mail server expects authentication you should give one more property, so the code will be:
    if(user != null) // should be authenticated
      props.put("mail.smtp.auth", "true");
    else
      props.put("mail.smtp.auth", "false");
    props.put("mail.smtp.host", "SMTP.mail.yahoo.com");
    sendMailSession = Session.getInstance(props, null);
    ... // fill newMessage
    if(user != null) { // should be authenticated
      newMessage.saveChanges();
      Transport transport = session.getTransport("smtp");
      transport.connect(mailhost, user, password);
      transport.sendMessage(newMessage, newMessage.getAllRecipients());
      transport.close();
    else
      Transport.send(newMessage);

  • Oracle Install Base API question

    Hi...I need help. I am writing an extension to the Service Fulfillment Manager (SFM) Transactions
    Here is a functional background:
    For all SFM message types, SFM exposes the PL/SQL code in the iMessage studio. iMessage studio is an Oracle EBS Application tool. The PL/SQL for the following message types will be modified:
    ·     Sales Order Shipment - CSISOSHP
    ·     Miscellaneous Receipt - CSIMSRCV
    ·     Receipt into Inventory – CSIPOINV
    The processing logic for each of these transaction types contains a call to an Installed Base package and stores the return status in a variable. For PO Receipt and SO Issue transactions referencing serial numbers prefixed by the Vertical Bar (‘|’) character this call will be bypassed and a successful status placed in the return status variable.
    For PO Receipt and Miscellaneous Receipt transactions referencing serial numbers not prefixed by the Vertical Bar (‘|’) character, the processing logic will be extended to extract the IUID value from the serial numbers table in the Oracle Inventory module (MTL_SERIAL_NUMBERS) and call the public IB Application Programming Interface (API) (CSI_ITEM_INSTANCE_PUB.UPDATE_ITEM_INSTANCE) to update the associated IB instance with the IUID.
    OK, so Question #1:
    I get all I need to do is bypass the code in 2 instances if a bar is found at the beginning of the serial number.. And I can do that. But where is this serial number? I assume it is stored in MTL_SERIAL_NUMBERS but how do I get it?
    The code doesn't have it stored as a variable, and it doesn't seem to have the IB record either. Is there a foreign key? Anyone have imessage studio and can look into that?
    Question #2:
    To update the IB record with the serial number I need to make a call to the below procedure. The thing is, it seems to require the IB instance record. Again, I don't have that cause the code is creating it! Is there some way to get that created record back and pass it into the update procedure?
    PROCEDURE update_item_instance
    p_api_version IN NUMBER
    ,p_commit IN VARCHAR2
    ,p_init_msg_list IN VARCHAR2
    ,p_validation_level IN NUMBER
    ,p_instance_rec IN csi_datastructures_pub.instance_rec
    ,p_ext_attrib_values_tbl IN OUT NOCOPY csi_datastructures_pub.extend_attrib_values_tbl
    ,p_party_tbl IN OUT NOCOPY csi_datastructures_pub.party_tbl
    ,p_account_tbl IN OUT NOCOPY csi_datastructures_pub.party_account_tbl
    ,p_pricing_attrib_tbl IN OUT NOCOPY csi_datastructures_pub.pricing_attribs_tbl
    ,p_org_assignments_tbl IN OUT NOCOPY csi_datastructures_pub.organization_units_tbl
    ,p_asset_assignment_tbl IN OUT NOCOPY csi_datastructures_pub.instance_asset_tbl
    ,p_txn_rec IN OUT NOCOPY csi_datastructures_pub.transaction_rec
    ,x_instance_id_lst OUT NOCOPY csi_datastructures_pub.id_tbl
    ,x_return_status OUT NOCOPY VARCHAR2
    ,x_msg_count OUT NOCOPY NUMBER
    ,x_msg_data OUT NOCOPY VARCHAR2
    Thanks for any and all help in advance!

    OK! I found the instance id!
    But when trying to get the IB record, the API fails. Can someone take a look at this...what's wrong?
    msg_data from API call =
    MSG DATA FND FND_AS_UNEXPECTED_ERROR N PKG_NAME CSI_ITEM_INSTANCE_PUB N PROCEDURE_NAME GET_ITEM_INSTANCE_DETAILS N ERROR_TEXT ORA-01008: not all variables bound
    PROCEDURE populate_iuid(
    p_transaction_id IN NUMBER
    IS
    l_api_version CONSTANT NUMBER := 1.0;
    l_msg_count NUMBER;
    l_msg_data VARCHAR2(2000);
    l_msg_index NUMBER;
    l_instance_id_lst csi_datastructures_pub.id_tbl;
    l_instance_header_rec csi_datastructures_pub.instance_header_rec;
    l_party_header_tbl csi_datastructures_pub.party_header_tbl;
    l_party_acct_header_tbl csi_datastructures_pub.party_account_header_tbl;
    l_org_unit_header_tbl csi_datastructures_pub.org_units_header_tbl;
    l_instance_rec csi_datastructures_pub.instance_rec;
    l_party_tbl csi_datastructures_pub.party_tbl;
    l_account_tbl csi_datastructures_pub.party_account_tbl;
    l_pricing_attrib_tbl csi_datastructures_pub.pricing_attribs_tbl;
    l_org_assignments_tbl csi_datastructures_pub.organization_units_tbl;
    l_asset_assignment_tbl csi_datastructures_pub.instance_asset_tbl;
    l_ext_attrib_values_tbl csi_datastructures_pub.extend_attrib_values_tbl;
    l_pricing_attribs_tbl csi_datastructures_pub.pricing_attribs_tbl;
    l_ext_attrib_tbl csi_datastructures_pub.extend_attrib_values_tbl;
    l_ext_attrib_def_tbl csi_datastructures_pub.extend_attrib_tbl;
    l_asset_header_tbl csi_datastructures_pub.instance_asset_header_tbl;
    l_txn_rec csi_datastructures_pub.transaction_rec;
    l_return_status VARCHAR2(2000) ;
    l_instance_id NUMBER := 0 ;
    l_serial_number VARCHAR2(30);
    l_inventory_item_id NUMBER := 0 ;
    l_iuid VARCHAR2(150);
    CURSOR c_get_serial_numbers( p_transaction_id NUMBER ) IS
    SELECT inventory_item_id, serial_number, attribute1
    FROM mtl_unit_transactions
    WHERE transaction_id = p_transaction_id;
    BEGIN
    -- GET THE SERIAL NUMBER AND INVENTORY ITEM ID BY USING THE TRANSACTION ID
    FOR rec IN c_get_serial_numbers( p_transaction_id ) LOOP
    l_inventory_item_id := rec.inventory_item_id;
    l_serial_number := rec.serial_number;
    l_iuid := rec.attribute1;
    -- GET THE INSTANCE ID BY USING THE SERIAL NUMBER AND INVENTORY ITEM ID
    SELECT instance_id
    INTO l_instance_id
    FROM csi_item_instances
    WHERE inventory_item_id = l_inventory_item_id
    AND serial_number = l_serial_number;
    -- RETRIEVE THE INSTANCE RECORD TO BE UPDATED
    l_instance_rec.instance_id := l_instance_id;
    csi_item_instance_pub.get_item_instance_details(p_api_version => l_api_version
    ,p_commit => fnd_api.g_false
    ,p_init_msg_list => fnd_api.g_false
    ,p_validation_level => fnd_api.g_valid_level_full
    ,p_instance_rec => l_instance_header_rec
    ,p_get_parties => fnd_api.g_true
    ,p_party_header_tbl => l_party_header_tbl
    ,p_get_accounts => fnd_api.g_true
    ,p_account_header_tbl => l_party_acct_header_tbl
    ,p_get_org_assignments => fnd_api.g_true
    ,p_org_header_tbl => l_org_unit_header_tbl
    ,p_get_pricing_attribs => fnd_api.g_false
    ,p_pricing_attrib_tbl =>l_pricing_attribs_tbl
    ,p_get_ext_attribs => fnd_api.g_false
    ,p_ext_attrib_tbl => l_ext_attrib_tbl
    ,p_ext_attrib_def_tbl => l_ext_attrib_def_tbl
    ,p_get_asset_assignments => fnd_api.g_false
    ,p_asset_header_tbl => l_asset_header_tbl
    ,p_resolve_id_columns => fnd_api.g_false
    ,p_time_stamp => SYSDATE
    ,x_return_status => l_return_status
    ,x_msg_count => l_msg_count
    ,x_msg_data => l_msg_data
    );

Maybe you are looking for

  • ATV keeps disconnecting and losing network connection

    I konw this has been posted on seval discussion boards, but the answers are all over the place.  I have been watching Netflix over the last several weeks and noticed that almost routinely my ATV will stop playing and go back to the home screen.  Some

  • MacBook Pro 13" Only boots to safe mode and running VERY slow.

    Hi... Not posted on here before, but am desperate so hoping there are some experts out there who can help... I have 13" Macbook pro which has ceased to work properly - it runs very slowly and will only boot in safe mode. I have installed a new hard d

  • Is there a list view for Artists?

    I can bring up list view for playlist.  But I don't see a list view for artists.   How do I enable list view for Artists. If I can show the list view for Artists, I am hoping I can activate side bar, and make it behave list iTunes 10. 

  • Audition CS6 crashes while running Adaptive Noise Reduction

    Hi everyone! So that is the problem, I edit an audio file, run Adaptive Noise Reduction filter, and somewhere during the processing the computer just crashes. Sometimes it happens and sometimes not. I saw that computer showes up an alert message just

  • Can't change default user name on Authentication dialogs

    Due to a corrupt user account, I had to create a new user account. I specified a "2" at the end of my full name i.e. "Full Name 2" because I couldn't use the same full name as the corrupt account. I still haven't deleted the old corrupt one yet just