Package com.restfb.types
Class Message.Attachment
- java.lang.Object
-
- com.restfb.types.AbstractFacebookType
-
- com.restfb.types.FacebookType
-
- com.restfb.types.Message.Attachment
-
- All Implemented Interfaces:
Serializable
- Enclosing class:
- Message
public static class Message.Attachment extends FacebookType
Represents an attached file that you may find on a private message.- Since:
- 1.6.12
- Author:
- alockhart
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.restfb.types.FacebookType
FacebookType.Metadata
-
-
Constructor Summary
Constructors Constructor Description Attachment()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getFileUrl()
Message.ImageData
getImageData()
When the attached file is an image, Facebook will also send information about its width, height and url.String
getMimeType()
The attachment's mime type, for example image/jpeg.String
getName()
The attachment's filename, for example 121423423.jpg.Long
getSize()
The size of the attachment in bytes.Message.VideoData
getVideoData()
When the attached file is a video, Facebook will also send information about its width, height and url.boolean
isImage()
returns if the attachment is an imageboolean
isRemovedInEurope()
returns if the attachment is a placeholder for the real attachment, that is not accessible via API due to privacy rules in Europe check at Facebookboolean
isVideo()
returns if the attachment is a videovoid
setFileUrl(String fileUrl)
void
setImageData(Message.ImageData imageData)
When the attached file is an image, Facebook will also send information about its width, height and url.void
setMimeType(String mimeType)
The attachment's mime type, for example image/jpeg.void
setName(String name)
The attachment's filename, for example 121423423.jpg.void
setSize(Long size)
The size of the attachment in bytes.void
setVideoData(Message.VideoData videoData)
When the attached file is a video, Facebook will also send information about its width, height and url.-
Methods inherited from class com.restfb.types.FacebookType
getId, getMetadata, getType, setId, setMetadata, setType
-
Methods inherited from class com.restfb.types.AbstractFacebookType
equals, hashCode, toString
-
-
-
-
Constructor Detail
-
Attachment
public Attachment()
-
-
Method Detail
-
isImage
public boolean isImage()
returns if the attachment is an image- Returns:
- true if the attachment is an image, false otherwise
-
isVideo
public boolean isVideo()
returns if the attachment is a video- Returns:
- true if the attachment is a video, false otherwise
-
isRemovedInEurope
public boolean isRemovedInEurope()
returns if the attachment is a placeholder for the real attachment, that is not accessible via API due to privacy rules in Europe check at Facebook- Returns:
- true if not accessible in the EU
-
getName
public String getName()
The attachment's filename, for example 121423423.jpg.- Returns:
- The attachment's filename.
-
getMimeType
public String getMimeType()
The attachment's mime type, for example image/jpeg.- Returns:
- The attachment's mime type.
-
setMimeType
public void setMimeType(String mimeType)
The attachment's mime type, for example image/jpeg.
-
getSize
public Long getSize()
The size of the attachment in bytes.- Returns:
- The size of the attachment in bytes.
-
getFileUrl
public String getFileUrl()
-
setFileUrl
public void setFileUrl(String fileUrl)
-
getImageData
public Message.ImageData getImageData()
When the attached file is an image, Facebook will also send information about its width, height and url.- Returns:
- The attachment's image data.
-
setImageData
public void setImageData(Message.ImageData imageData)
When the attached file is an image, Facebook will also send information about its width, height and url.
-
getVideoData
public Message.VideoData getVideoData()
When the attached file is a video, Facebook will also send information about its width, height and url.- Returns:
- The attachment's video data.
-
setVideoData
public void setVideoData(Message.VideoData videoData)
When the attached file is a video, Facebook will also send information about its width, height and url.
-
-