com.google.code.facebookapi
Class PhotoTag

java.lang.Object
  extended by com.google.code.facebookapi.PhotoTag

public class PhotoTag
extends java.lang.Object

Data structure for representing a photo tag. Required by some API calls.


Constructor Summary
PhotoTag(long taggedUserId, double x, double y)
          Constructor.
PhotoTag(java.lang.String text, double x, double y)
          Constructor.
 
Method Summary
 java.lang.Long getTaggedUserId()
           
 java.lang.String getText()
           
 double getX()
           
 double getY()
           
 boolean hasTaggedUser()
          Check to see if this PhotoTag is tagging a specific Facebook user
 org.json.JSONObject jsonify()
          Convert the tag to a JSON representation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PhotoTag

public PhotoTag(java.lang.String text,
                double x,
                double y)
Constructor.

Parameters:
text - the text/label associated with this tag
x - the 'x' offset for the tegged region
y - the 'y' offset for the tagged region

PhotoTag

public PhotoTag(long taggedUserId,
                double x,
                double y)
Constructor.

Parameters:
taggedUserId - the UID of the user being tagged in the image
x - the 'x' offset for the tegged region
y - the 'y' offset for the tagged region
Method Detail

hasTaggedUser

public boolean hasTaggedUser()
Check to see if this PhotoTag is tagging a specific Facebook user

Returns:
true if the tag is referencing a specific Facebook user false otherwise

getX

public double getX()
Returns:
the X coordinate of the tag

getY

public double getY()
Returns:
the Y coordinate of the tag

getText

public java.lang.String getText()
Returns:
the text/label associated with this tag

getTaggedUserId

public java.lang.Long getTaggedUserId()
Returns:
the id of the associated Facebook user, or null if there isn't one.

jsonify

public org.json.JSONObject jsonify()
Convert the tag to a JSON representation.

Returns:
a JSONObject representing this tag


Copyright © 2010. All Rights Reserved.