Posting Running workouts to Facebook Wall (Read 2601 times)

alevansal


    What do you see in the app's Preferences tab under the Facebook Preferences?  There should either be a Publish button, or a set of radio buttons.  If you don't see either, then removing the permissions will bring them back.  I am hoping this is the cause of the problem.  If you see either the Publish button or the radio buttons, then it's most liking a FB issue.

     

    I get one or the other of the following combinations:

     

    Facebook & RunningAhead SettingsFacebook and RunningAhead Settigns

    eric :)


      This is what I was hoping for!

       

      You need to click the Publish button and grant the app the necessary permissions to post to your wall.  You then should see a set of 3 radio buttons that lets you control which workouts to publish.  After that, try logging a new workout and see if it is posted to your wall.

      Trent


      Good Bad & The Monkey


        Hi, Trent. 

         

        Howdy!

         

        Two Tapir sightings at RA in one week!

        alevansal


          This is what I was hoping for!

           

          You need to click the Publish button and grant the app the necessary permissions to post to your wall.  You then should see a set of 3 radio buttons that lets you control which workouts to publish.  After that, try logging a new workout and see if it is posted to your wall.

           

          I don't get the 3 radio buttons.  I go to application settings and remove additional permissions so that I can get the Publish button in the Running Ahead Facebook preferences.  I click Publish, and I get the Request for Permission dialog (shown below).  I click Allow, the dialog closes and my Facebook preferences look like they did before.  I click Save, the tab changes from the Preferences tab to the Summary tab.  When I go back to the Preferences tab, there's no longer a Publish button, and my Application Settings for RunningAhead has the Additional Permission tab and both the toggles for Access my data when I'm not using the application and Publish content to my wall are selected.  Just as a side note, everything was working very well until the beginning of September, so my Permissions were set correctly once upon a time.

           

          Facebook & RunningAhead Settings

          alevansal


            I just noticed there's an error any time I access RunningAhead via Facebook:

             

            Webpage error details

            User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB6; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; MDDR; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
            Timestamp: Wed, 29 Sep 2010 20:33:33 UTC


            Message: Expected ';'
            Line: 11
            Char: 284
            Code: 0
            URI: http://external.ak.fbcdn.net/fbml_static_get.php?src=http%3A%2F%2Fwww.runningahead.com%2Fjs%2Ffacebook.js%3Fv%3DF12C&appid=2382909559&pv=1&sig=1aefd1d4ec8eb8999fb1d8a89251f57c&filetype=js

             

            I have no idea if it has relevance to the publishing issue.

            eric :)


              I looked more into this problem and the javascript error does have something to do with it.  It was a head scratcher until I realized this is a bug in my code that is introduced by Facebook.  Facebook sanitizes each application's javascript code to ensure the application doesn't do anything malicious.  One of the safety precautions involves renaming all the variable names.  FB erroneously renamed a number as a variable and thus breaking everything.  I worked around the problem and the radio buttons reappeared.

               

              Try removing the app's permissions and then re-enabling Publishing again.  You should see the radio buttons this time.

               

              By the way, thank you for the screen shots.  It really helps in tracking down the problems.

               

              eric :-)

              alevansal


                Oh, yay!  It worked!

                 

                You are most welcome for the screen shots.  I very much appreciate your willingness to keep trying to find and fix the problem.

                 

                Autumn

                Runreno


                  Thanks Eric.  RA is posting on Facebook.

                  www.running-distance-tips.com

                  xor


                    Facebook sanitizes each application's javascript code to ensure the application doesn't do anything malicious.  One of the safety precautions involves renaming all the variable names.  FB erroneously renamed a number as a variable and thus breaking everything.

                     

                    They need to work harder on their maliciousness checking.

                     

                    And.  Seriously?  They recast a number as a variable??

                     

                    eric :)


                      Mr. Lopez,

                      This is for your amusement:

                       

                      The broken code involves converting distance from kilometers to meters, which is something like "meters = kilometers * 1000".  Simple enough.  I use Google's Closure Compiler to compress all the javascripts.  It reduces the file size, which reduces download time.  A smaller file means less parsing, which means shorter execution time.

                       

                      The Closure Compiler is very interesting because it actually rewrites the logic to produce smaller code.  I can give you examples of this if you like.  In the unit conversion case, the compressed code looks something like: "m=k*1E3".  As you know, 1E3 is the exponential representation of 1000, and is a valid number in javascript.  When FB does its check, it renames the line as "A5234234_m=A5234234_k*1A5234234_E3".  The "A5234234_" prefix wraps the app's code in its own namespace.  Somehow, the prefix is inserted between 1 and E3.  Since everything is wrapped in a try/catch block, the error is silently dropped.  Great fun!

                      Trent


                      Good Bad & The Monkey

                      ksfiles


                        This still isn't working for me. I get the Publish button. When I click on it, I just get a Loading message, but never get the permission request. Firebug shows that the page makes 2 successful requests for data.

                        ksfiles


                          Hey, today it worked for me. I hit Publish, got the permission dialog, and after allowing all activity, was able to select post to newsfeed. Thanks.

                          RunDeanRun


                            I have tried removing the app's permissions and then re-enabling Publishing again.  Still doesn't work. Please help.

                              Major apologies if I missed it over the previous 43 posts, but ... I'd like to use the FB feed thingie, but I don't want my notes/remarks visible on my FB wall.  But I DO want those notes to be accessible by my coach and any log-stalkers I may attract from time to time, all of whom can see it when here on RA.  Is there some middle ground between "everything is public" and "make this note private"?

                              "I want you to pray as if everything depends on it, but I want you to prepare yourself as if everything depends on you."

                              -- Dick LeBeau