Skip to content
This repository was archived by the owner on Jan 13, 2022. It is now read-only.

Commit 3372704

Browse files
author
Fosco Marotto
committed
Merge pull request #113 from niraj-shah/master
Added retrieval of app_data for Page Tab Apps
2 parents 4d77aa2 + b550927 commit 3372704

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

src/Facebook/FacebookPageTabHelper.php

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,19 @@ public function getUserId()
111111
}
112112
return null;
113113
}
114+
115+
/**
116+
* Returns the app_data if available.
117+
*
118+
* @return object|null
119+
*/
120+
public function getAppData()
121+
{
122+
if (isset($this->parsedSignedRequest['app_data'])) {
123+
return $this->parsedSignedRequest['app_data'];
124+
}
125+
return null;
126+
}
114127

115128
/**
116129
* Parses a signed request.
@@ -158,4 +171,4 @@ private function parseSignedRequest($signedRequest)
158171
}
159172
}
160173

161-
}
174+
}

0 commit comments

Comments
 (0)