Zend Framework 1.12.16将用户重定向到特定操作(Zend Framework 1.12.16 redirect user to specific action)
我使用的是Zend Framework 1.12.16版。 我创建了两个模块,即用户和管理员。 我在application.ini中启用了用户模块作为我的默认模块:
resources.frontController.moduleDirectory = APPLICATION_PATH "/modules" resouces.modules[]= resources.frontController.defaultModule = "user"
因此,每当用户在url中的站点名称时,他就会自动将
indexController
索引操作用于用户模块中。 类似地,每当用户在http://example.local/admin中键入时,我希望用户可以将admin模块的loginController
的操作编入索引。 我可以使用application.ini中的一些设置来实现吗?I am using Zend Framework version 1.12.16. I have created two modules i.e. user and admin. I have set user module as my default module by enabling it in application.ini:
resources.frontController.moduleDirectory = APPLICATION_PATH "/modules" resouces.modules[]= resources.frontController.defaultModule = "user"
So, whenever users the name of the site in the url he is automatically taken to index action of
indexController
in user module. Similarly, I want the user to be taken to index action of theloginController
of admin module whenever user types in http://example.local/admin. Can I achieve that using some settings in application.ini ?
原文:https://stackoverflow.com/questions/32907788
最满意答案
好的,我找到了解决方案。 也许有人会感兴趣。 要添加包含分享按钮的链接,您必须使用“我/链接”而不是“我/ Feed”。
$attachment = array( 'access_token'=>TOKEN_HERE, 'message'=>'message_here', 'link' => 'http://www.example.com/', ); $result = $facebook->api( 'me/links', 'post', $attachment );
ok, I found solution. maybe someone will be interested. to add a link with share button you have to use 'me/links' instead of 'me/feed'.
$attachment = array( 'access_token'=>TOKEN_HERE, 'message'=>'message_here', 'link' => 'http://www.example.com/', ); $result = $facebook->api( 'me/links', 'post', $attachment );
相关问答
更多-
使用Graph API阅读Facebook页面的墙 - 可能吗?(Read Wall of a Facebook Page by using the Graph API - possible?)[2022-03-07]
现在对于FACEBOOK PAGE,它与朋友墙只是相同的graphAPI调用...只需将用户ID替换为页面ID,如下面的url https://graph.facebook.com/40796308305/feed?access_token=2227470867|2.oYiXeutFctg5rAweCFSIPw__.3600.129027 ..................... 就像那样简单。 谢谢你 Now for FACEBOOK PAGE, it is just the same graphAPI ... -
看看我的回答 Facebook Graph API:参与计数细分 你应该可以打电话 /?fields=id,share,og_object{engagement{count},likes.summary(true).limit(0),comments.limit(0).summary(true)}&id=http://www.google.com 返回类似的东西 { "id": "http://www.google.com", "share": { "comment_count": 2, ...
-
正如我所假设的那样,我错过了对客户端API的调用以请求扩展权限。 (即publish_stream)。 我有一个简单的JavaScript函数,它作为FBML Login控件的“onlogin”属性的一部分执行。 以前,我只是在进行重定向(然后在服务器端代码中进行单点登录)。 现在,我这样做: function postLogin(targetUrl) { FB.Facebook.apiClient.users_hasAppPermission('publish_stream', function(r ...
-
我找到了原因: 当用户禁用Facebook平台时,图形调用中将省略所有数据。 在这种情况下,即使数据在Facebook上可用。 您可以拥有所需的所有权限。 您将无法从Facebook检索数据。 I have found the reason: When a user disables the Facebook Platform, all the data will be omitted in Graph Calls. In this case, even when the data is available ...
-
您需要通过重新提交或提交您的应用程序再次审核来获得Facebook的批准,权限是publish_action检查有关此特定权限的facebook开发文档,您将获得提交审核所需的过程。 这是链接 You need to get approval from facebook by resubmitting or submitting your app with review again the permission is publish_action check facebook dev documentati ...
-
使用图形api私下发布到facebook上的朋友墙(Posting to a friends wall on facebook privately using graph api)[2024-01-02]
我认为Facebook目前不允许你这样做。 查看发布时的图形API文档: http://developers.facebook.com/docs/reference/api/post/ 它在隐私方面说: “注意:此隐私设置仅适用于当前或指定用户自己的Wall的帖子.Facebook忽略了针对目标Wall帖子的此设置(当用户在朋友的墙上写作时,页面,事件,连接到用户的组)与Facebook上的行为一致,任何可以看到目标墙的人都可以查看所有目标帖子。“ 我认为这意味着,如果你发布在别人的墙上(饲料),隐私是你无 ... -
总之,我可以代表另一个使用服务器端代码的用户写一个人的墙吗? 截至2月6日的重大更改 ,您无法再通过Graph API发布到用户的朋友的墙上。 这意味着您不能代表其他用户使用任何代码语言或SDK在某人的墙上写字。 您必须使用Feed对话框或使用Mention Tagging或Action Tagging。 来自Facebook开发者路线图: 通过用户提及标记或动作标记包含朋友的故事将显示在朋友的时间线上(假设朋友批准标记)。 In short can I write to someone's wall on ...
-
使用API Graph和缺少共享按钮发布到Facebook墙(Post to facebook wall using API Graph and missing share button)[2023-05-10]
好的,我找到了解决方案。 也许有人会感兴趣。 要添加包含分享按钮的链接,您必须使用“我/链接”而不是“我/ Feed”。 $attachment = array( 'access_token'=>TOKEN_HERE, 'message'=>'message_here', 'link' => 'http://www.example.com/', ); $result = $facebook->api( 'me/links', 'post', $attachm ... -
Facebook,Graph API(Facebook,Graph API)[2023-01-31]
http://developers.facebook.com/docs/reference/api/ http://developers.facebook.com/docs/reference/api/ -
默认情况下, fb.request方法使用GET请求。 当您打算创建新帖子时,您需要使用POST方法。 这样做很简单 - 只需将第三个参数( httpMethod )传递为“POST”即可。 例如: String res = fb.request(GROUP_ID+"/feed",params,"POST"); 有关详细信息: https : //developers.facebook.com/docs/reference/androidsdk/ayncrequest/ 此外,第一个参数需要是一个完整的UR ...