id = (string) $id; $this->secret = $secret; } /** * Returns the app ID. * * @return string */ public function getId() { return $this->id; } /** * Returns the app secret. * * @return string */ public function getSecret() { return $this->secret; } /** * Returns an app access token. * * @return AccessToken */ public function getAccessToken() { return new AccessToken($this->id . '|' . $this->secret); } /** * Serializes the FacebookApp entity as a string. * * @return string */ public function serialize() { return implode('|', [$this->id, $this->secret]); } /** * Unserializes a string as a FacebookApp entity. * * @param string $serialized */ public function unserialize($serialized) { list($id, $secret) = explode('|', $serialized); $this->__construct($id, $secret); } }