$db = mysql_connect("localhost", "root", "");
$er = mysql_select_db("ram");
$query = "insert into names values('$name','$add1','$add2','$mail')";
$result = mysql_query($query);
print "<p> Person's Information Inserted </p>";
$result = mysql_query("SELECT * FROM names");
?>
<table border="2">
<tr>
<th>Name</th>
<th>Address Line 1</th>
<th>Address Line 2 </th>
<th>E-mail Id </th>
</tr>
<?
while ($array = mysql_fetch_row($result));
{
print "<tr> <td>";
echo $array[0];
print "</td> <td>";
echo $array[1];
print "</td> <td>";
echo $array[2];
print "</td> <td>";
echo $array[3];
print "</td> </tr>";
}
?>
Run Code Online (Sandbox Code Playgroud) 我想通过使用URL或特定标识符来获取facebook组ID.
例如:http://www.facebook.com/groups/chennaifoodies/应该给组ID 194462073956868.有没有办法通过使用上面的URL或像'chennaifoodies'这样的标识符来获取组ID?
如果我尝试了https://graph.facebook.com/chennaifoodies,那么它会给出粉丝页面ID.
我认为'wallflux'已经完成了一个很好的脚本,所以我需要一个这样的脚本来获得组ID.
有没有办法使用图形api或fql获取组ID?
谢谢.
我正在关注facebook(https://developers.facebook.com/docs/android/share)的facebook android共享教程.该应用程序运行正常,我可以登录Facebook点击演示共享按钮.所以这是我的应用程序:
user_likes, user_friends, user_status, basic_infopublish_actions由以下代码执行此请求:
public class MainActivity extends Activity {
private Button shareButton;
private UiLifecycleHelper uiHelper;
private static final List<String> PERMISSIONS = Arrays.asList("publish_actions");
private static final String PENDING_PUBLISH_KEY = "pendingPublishReauthorization";
private boolean pendingPublishReauthorization = false;
...
private void publishStory() {
Session session = Session.getActiveSession();
if( session != null) {
List<String> permissions = session.getPermissions();
if(!isSubsetOf(PERMISSIONS, permissions)) {
pendingPublishReauthorization = true;
Session.NewPermissionsRequest newPermissionsRequest = new Session.NewPermissionsRequest(this, PERMISSIONS);
//Request the new permission here. …Run Code Online (Sandbox Code Playgroud) permissions android facebook facebook-graph-api facebook-android-sdk
我想在我的脸书应用程序中获得用户的一些登录许可.Facebook要求开发人员在向开发人员提供任何额外权限之前发送他们的应用程序以供审核.为此,您似乎必须完成应用程序并且它正在运行,以便他们可以测试并执行他们想要的任何操作,然后向开发人员或应用程序提供额外的必需登录权限!
目前我只测试应用程序并且它不完整,但我需要额外的登录权限(manage_pages确切地说),所以我可以看到我的应用程序将做什么以及它将如何工作...
但似乎facebook只要求将完全开发的应用程序发送给审核.
这一切都非常令人困惑.和Facebook的文件就像是由一个2指法的人写的,甚至连整句话都不能打扰!
我的问题是:
有没有什么方法可以创建一个应用程序并获得测试应用程序所需的所有登录权限,并使其全部工作,然后将其发送到Facebook审查?
提前致谢.
我正在使用Facebook PHP SDK来调用相关的API来发布和获取数据.目前我正在数据库中保存用户访问令牌,但它会在60天后过期.如何刷新用户访问令牌?
1.我什么时候需要刷新访问令牌?它到期后还是之前?
2.刷新访问令牌的最佳方法是什么?
3.我的用户是否需要再次登录才能刷新访问令牌?
这是我用来扩展访问令牌的功能.但到期时间保持不变.
public function getExtendedAccessToken($access_token)
{
$token_url="https://graph.facebook.com/oauth/access_token";
$params=array('client_id'=>self :: appId,'client_secret'=>self :: appSecretId,'grant_type'=>'fb_exchange_token','fb_exchange_token'=>$access_token);
$response = $this->curl($token_url,$params);
$response = explode ('=',$response);
$response = explode ('&',$response[1]);
$response = $response[0];
return $response;
}
Run Code Online (Sandbox Code Playgroud) php facebook facebook-graph-api facebook-php-sdk facebook-access-token
我使用facebook 3.6 sdk.我想从图形用户获取个人资料图片,上次我有图像,但现在它返回null位图.
我使用以下代码
private void onSessionStateChange(Session session, SessionState state,
Exception exception) {
if (session.isOpened()) {
Request.newMeRequest(session, new Request.GraphUserCallback() {
@Override
public void onCompleted(GraphUser user, Response response) {
if (user != null) {
try {
URL imgUrl = new URL("http://graph.facebook.com/"
+ user.getId() + "/picture?type=large");
InputStream in = (InputStream) imgUrl.getContent();
Bitmap bitmap = BitmapFactory.decodeStream(in);
//Bitmap bitmap = BitmapFactory.decodeStream(imgUrl // tried this also
//.openConnection().getInputStream());
} catch (Exception e) {
e.printStackTrace();
}
}
}
}).executeAsync();
}
}
Run Code Online (Sandbox Code Playgroud)
当我使用直接链接然后它工作.
imgUrl = new URL("https://fbcdn-dragon-a.akamaihd.net/hphotos-ak-ash3/t39.2365-6/851558_160351450817973_1678868765_n.png");
Run Code Online (Sandbox Code Playgroud)
我也提到了这个 …
根据Facebook的文档请求生日数据通过请求做user_birthday权限集,然后将生日串下保存生日返回数组英寸
它返回的格式是什么,格式是否根据用户设置而有所不同?
我预测的格式
1990-05-22 // standard
05.22.1990 // USA reverse format
22.05 // User hid birth year
1990 // Getting only birth year without a date
NULL // User hid entire birthday
Run Code Online (Sandbox Code Playgroud)
对我来说,现在重要的是确定Facebook是否提供一种标准格式的生日值或其格式取决于用户的生日设置?
在FQL event_member页面的描述中,它表示该列inviter应告知我们在活动中邀请UID的用户或页面的ID,并inviter_type应告知我们邀请者是用户还是页面.我已经在公共事件和我自己创建的事件上尝试过这些函数,但它总是失败.
"inviter":null和"inviter_type":""表示每个用户.
这是一个错误,一个不再起作用的旧功能,还是一个不起作用的新功能?
我正在使用Graph API的FB javascript驱动程序,允许用户从他们的Facebook帐户中挑选照片.他们第一次连接时会提示他们登录:
FB.login(function(res) {
if (res.status == 'connected') {
auth = res.authResponse; // cache auth response
getAlbums();
}
});
Run Code Online (Sandbox Code Playgroud)
如果成功,我会缓存返回的auth对象并立即获取用户的相册:
function getAlbums() {
FB.api('/me/albums', function(res) {
albums = res.data;
});
}
Run Code Online (Sandbox Code Playgroud)
使用返回的对象,我遍历相册并显示以下内容cover_photo:
https://graph.facebook.com/{{album.cover_photo}}/picture?type=normal&access_token={{auth.accessToken}}
Run Code Online (Sandbox Code Playgroud)
用户第一次登录时,所有封面照片都是问号图标.但是,如果用户刷新,或返回页面,应用程序的重新认证,识别用户已经登录,并且显示适当的cover_photo缩略图.
如何让新认证的用户能够看到他们的封面照片?
javascript facebook oauth facebook-graph-api facebook-javascript-sdk
我正在构建一个自定义的水平轮播,在其中我要显示一些可以垂直滚动的项目。
到目前为止我尝试过的代码:
html
<div class="carousel">
<div class="c-item">Item-1</div>
<!-- to be displayed vertically -->
<div class="abs">
<div class="a-item">Abs Item-1.1</div>
<div class="a-item">Abs Item-1.2</div>
<div class="a-item">Abs Item-1.3</div>
</div>
<div class="c-item margin">Item-2</div>
<!-- to be displayed vertically -->
<div class="abs">
<div class="a-item">Abs Item-2.1</div>
<div class="a-item">Abs Item-2.2</div>
<div class="a-item">Abs Item-2.3</div>
</div>
</div>
<div class="other">
Other div
</div>
Run Code Online (Sandbox Code Playgroud)
的CSS
.carousel{
color: #FFF;
white-space: nowrap;
overflow-x: auto;
overflow-y: hidden;
position: initial;
.c-item{
display: inline-block;
width: 35%;
background: #000;
height: 100px;
&.margin{
//margin-left: 35%;
}
}
.abs{
background: …Run Code Online (Sandbox Code Playgroud) facebook ×8
android ×2
php ×2
css ×1
database ×1
facebook-fql ×1
html ×1
javascript ×1
oauth ×1
permissions ×1
sass ×1