Reading FB feeds with access_token and FB.api() aka getting f***ed up by the Facebook JS API

Yesterday i had to fix a loading issue on one of our Facebook Pages. On the page we are calling the JS FB Api with:


FB.api(
"[page]/feed?limit=[limit]&access_token=[accesstoken]", 
function(response) { ... }
);

This call worked over a long time and then we got the following error:

The passed argument could not be parsed as a url. Domain contained invalid characters.

I searched the web for an answer but found nothing. As usual the Facebook Developer Documentation was crap.

The problem is, that the call failes when you add the access_token parameter to the Api URL.
After trying some things and getting angry i found this solution:


FB.api(
[page]/feed?limit=[limit],
{ access_token: [access_token]}
,function(response) { }
);

I hope this helps someone out there!

, , , , , , , , , , , ,

No Comments

Upgrade your Thinkpad W510/W520 display to Full HD

Last year a bought my Thinkpad W520. What should i say? With SSD, SATA HDD (by adapter) and 8 GB RAM it is a machine from hell. But one thing bothered me from the beginning… The screen resolution: 1600x900px. Lenovo declares this as “HD”… I would say it as sh.. . Why buy a 15.4″ Notebook with such a Display? Of course i ordered it with that configuration but i quickly realized that I was not so happy with that display.

I searched some days and contacted a local dealer. I thought upgrading a diplay would not be a big thing for a specialist. But my contact wouldn’t take part of the upgrade action because upgrading notebook hardware (beside RAM and HDD) is always a little bit risky. But i had luck! I found a offer on ebay with the fitting part number: 04W1544. Costs: EUR 136,99 (with express shipping)

Use the right tools…

I think IBM/Lenovo offers the best hardware maintenance guides i ever seen. You can download the manual for the W520 (this manualy covers also the T520 and T520i) here: http://support.lenovo.com/en_US/guides-and-manuals/detail.page?LegacyDocID=MIGR-76854

After miles of security information they recommend to use always new screws… I did not… But i used a special torx screw driver to apply the recommend torque to the screws as described in the manual. I found the WIHA Torque Vario-S with 0.1 to 0.6 nm (http://www.wiha.com/germany/Onlineshop/Drehmomentwerkzeuge3/2852-Wiha-TorqueVario-R-S-Griff).

Exchanging the display by following the manual is no rocket sience! I think you can do it by your own just with the manual in front of you.

But...

I think many of you are interested in the type of display which fits into the W520((i hope many of you guys are coming from google and find the answer here…)

This was the old display:

And this is the new display:

When you search the web for LP156WF1(TL)(A1) you will find many offers with compatible display (glare and non-glare).

I hope this will help some people out there.

, , , , , , , , , ,

No Comments

Flash Builder Profiler connection problems

I’m not profiling Applications that often but as i can remember i always have the same issue when i try it at home.

Im using Windows 7 Pro (64-Bit) on my ThinkPad and using an account with administrator privileges.

And the admin privileges are the only problem! I could not found any detailed information about this issue so i do not know the cause behind it.

So, if you want to provile your applications either change your user account to a normal one or setup a second account with normal user privileges.

, , , , , , , , , ,

No Comments

Disabling ctrl-alt + arrow key roation shortcuts on W520 ThinkPad

After posting nothing for about 2 years now (crazy shit!) i have to post this solution because i was getting really pissed of during fixing this problem. Perhaps this post will start a new era of regular posting  (even if no one is interested in the things im writing) :)

Today i was wondering why the duplicate line features (ctrl+alt+arrow-up/down) in Eclipse are not working and it took me about one hour to fix it. Every time i pressed ctrl+alt+ arrow key the screen  changed the rotation depending on the arrow i pressed.

For most (non-lenovo) users it will suffice to deactivate the shortcuts inside the Intel Control Software in the options section.

If you are using a ThinkPad (and i hope you are doing so) you have to do an additional step:

You have to uninstall this  little bastard: “Lenovo Reading Optimizer“. After this the screen rotation will be completely deactivated and you can use the shortcuts in Eclipse etc.

No Comments

Adobe AIR 1.5 LocalConnection with swf in Browser

Yesterday i tried to implement the basic functions for a framework debugger tool. When i opened the SWF’s in Firefox or via the standalone Flash Player the local connection was working.

Between the AIR application launched by Flex and the swf in the Browser the local connection was not working.

Why is explained here: http://help.adobe.com/en_US/AIR/1.5/devappshtml/WS5b3ccc516d4fbf351e63e3d118666ade46-7c7e.html

If the string for connectionName does not begin with an underscore, the runtime adds a prefix with the superdomain name and a colon (for example, myDomain:connectionName). Although this ensures that your connection does not conflict with connections of the same name from other domains, any sending LocalConnection objects must specify this superdomain (for example, myDomain:connectionName). If you move the HTML or SWF file with the receiving LocalConnection object to another domain, the runtime changes the prefix to reflect the new superdomain (for example, anotherDomain:connectionName). All sending LocalConnection objects have to be manually edited to point to the new superdomain.

Solution: When you want to build a tool which communicates with swfs in browser use a underscore (“_”) as prefix for the connection names.

No Comments

FLVPlayback complete error

Last week my FLVPlayback Component thought that is has finished the playback of the video in the first third of the Video.

I tried many ways, even reencoding the Video until i found a litte line of code which solved the Problem.

The property “playheadUpdateInterval” of the flvPlayback was set to 10 milliseconds.

I do not know what exactly happens inside the flvplayback compontent but this short update interval is responsible for the early video complete error

, , ,

No Comments

FLVPlayback with Kewego URL’s

Today i tried to use the FLVPlayback Component with the Kewego API. The connect fails because FLVPlayback will try to connect with the SMILManager to the video url generated by the Kewego API.

There is a easy way to solve this Problem: Write your own net connection manager.

package
{
  import fl.video.INCManager;
  import fl.video.NCManager;
  import fl.video.ParseResults;
  import fl.video.SMILManager;
  import fl.video.VideoError;
  import fl.video.flvplayback_internal;

  use namespace flvplayback_internal;

  public class KewegoNCManager extends NCManager implements INCManager
  {
    override public function connectToURL(url : String) : Boolean
        {
            //ifdef DEBUG
            //debugTrace("connectToURL(" + url + ")");
            //endif

            // init
            initOtherInfo();
            _contentPath = url;
            if (_contentPath == null || _contentPath == "")
            {
                throw new VideoError(VideoError.INVALID_SOURCE);
            }

            // parse URL to determine what to do with it
            var parseResults : ParseResults = parseURL(_contentPath);
            if (parseResults.streamName == null || parseResults.streamName == "")
            {
                throw new VideoError(VideoError.INVALID_SOURCE, url);
            }

            // connect to either rtmp or http or download and parse smil
            var canReuse : Boolean;
            if (parseResults.isRTMP)
            {
                LogManager.info(this, "\t connectToURL is RTMP");
                canReuse = canReuseOldConnection(parseResults);
                _isRTMP = true;
                _protocol = parseResults.protocol;
                _streamName = parseResults.streamName;
                _serverName = parseResults.serverName;
                _wrappedURL = parseResults.wrappedURL;
                _portNumber = parseResults.portNumber;
                _appName = parseResults.appName;

                if ( _appName == null || _appName == "" || _streamName == null || _streamName == "" )
                {
                    throw new VideoError(VideoError.INVALID_SOURCE, url);
                }
                _autoSenseBW = (_streamName.indexOf(",") >= 0);
                return (canReuse || connectRTMP());
            }
            else
            {
                var name : String = parseResults.streamName;

                if (name.indexOf("kewego") > 0 && name.indexOf("flv?key") > 0)
                {

                    canReuse = canReuseOldConnection(parseResults);
                    _isRTMP = false;
                    _streamName = name;
                    return (canReuse || connectHTTP())
                }
                if ( name.indexOf("?") < 0 && (name.length < 4
                || name.slice(-4).toLowerCase() != ".txt") &&
                (name.length < 4 || name.slice(-4).toLowerCase() != ".xml") &&
                (name.length < 5 || name.slice(-5).toLowerCase() != ".smil") )
                {

                    canReuse = canReuseOldConnection(parseResults);
                    _isRTMP = false;
                    _streamName = name;
                    return (canReuse || connectHTTP());
                }

                if (name.indexOf("/fms/fpad") >= 0)
                {
                    try
                    {
                        return connectFPAD(name);
                    } catch (err : Error)
                    {
                    }
                }

                _smilMgr = new SMILManager(this);
                return _smilMgr.connectXML(name);
            }
        }
      }
  }

Then you have to assign the Connection Manager to the VideoPlayer:

VideoPlayer.iNCManagerClass = KewegoNCManager;

That’s it.

No Comments

thefwa.com -> volkswagen2028.com site of the day

unglaublich, aber wahr, mein baby die futuresite (aka volkswagen 2028.com) hat es heute beim thefwa.com (the favorite website awards) zur Site of the Day geschafft.

sotd

Mal schauen, vielleicht schafft Sie es ja auch zur Site of the Month! Das wäre dann nach dem Audi R8 Webspecial die zweite Seite an der ich mitgewirkt habe.

No Comments

AMFPHP times out (gzip)

Vor kurzem musste ich feststellen, dass das Remoting zu AMFPHP auf verschiedenen Seiten des gleichen Servers nicht mehr richtig funktioniert. Das Problem war, dass AMFPHP zwar ein Ergebnis zurücklieferte, aber der Browser nicht mitbekommen hat, dass das Ergebnis vollständig geladen hat (gesendete Daten != Content-length). Das äußerte sich darin, dass der Browser dann bis zum Timeout wartet, in diesem Falle 15 Sekunden.

Das gleiche Phänomen taucht aber auch bei Gallery2 bildern auf wenn diese über die Main.php Schnittstelle geladen werden. Das Bild ist schon vollständig da, der Browser wartet aber immer noch auf Daten, die er nie bekommen wird. Hier habe ich aber noch keine Lösung gefunden. Sobald sich hier etwas ergibt, gebe ich Bescheid.

Ursache: Ich gehe davon aus, dass auf unserem Webserver was geändert wurde, was unmittelbar mit gzip zusammenhängt. Hier kann ich aber keine genaue Aussage treffen, da warte ich noch auf die Rückmeldung von meinem Serveradmin (gelle Björn ;D)

Lösung für AMFPHP (1.9):

core/amf/app/Gateway.php -> (ca. Zeile 230)

[....]

$outputCompression = @ini_get(“zlib.output_compression”);
$outputCompression = true; // diese Zeile einfügen! und es funktioniert wieder – jedenfalls bei mir
if(!$outputCompression)

[....]

, , , ,

1 Comment

Windows 2003 Nutzungsberichte & Serverleistungsberichte Problem

Nachdem ich mich nun einige Stunden mit dem Problem beschäftigt habe, dass sowohl der Nutzungsbericht, als auch der Leistungsbericht nicht angezeigt wird habe ich endlich eine Lösung gefunden.

Problem: Wenn man in der MMC den Nutzungsbericht aufruft kommt “Seite nicht gefunden”.

Ursache: Der IIS hört nicht auf die IP Adresse 127.0.0.1 / Localhost. Wenn man die IP im IIS einträgt startet die Standardwebseite nicht mehr.

Fehler: Cannot register the URL prefix ‘SITENAME:80:IP/[...]‘ for site ‘…’. The IP address for the site is not in the HTTP.sys IP listen list. The site has been deactivated.

bzw.

Der URL-Präfix “http://127.0.0.1:80/_vti_bin/” für Site “1″ konnte nicht registriert werden. Die IP-Adresse für die Site ist nicht in der IP-Abhörliste von HTTP.sys aufgeführt. Die Site wurde deaktiviert. Das Datenfeld enthält die Fehlernummer.
Woran liegt das: “Ganz einfach”. Irgendwann hat man mal mit dem Tool HTTPCFG eingestellt, dass der HTTP Dienst nur auf bestimmte IPs hören soll.

Lösung: Alle IPLISTEN Konfigurationen entfernen

Kommandozeile:

net stop http /y

httpcfg query iplisten

alle gelisteten IPs mit: “httpcfg delete iplisten -i IP” entfernen, server mit: “net start w3svc” neu starten und siehe da: Die Nutzungsberichte und Leistungsberichte werden wieder in der MMC angezeigt. *YEHAAAA*

, , , , , , ,

No Comments

FireStats icon Powered by FireStats