get texture size problem

Hello I'm just learning OpenGL and am starting to write some FFGL plugins. I need to get the texture width and height of the incoming texture but I'm only getting a value of 0 returned by the following functions. Any ideas what I'm doing wrong?