Facebook墙贴在需要访问令牌密钥后无法正常工作(Facebook wall post not working after access token key required)
我使用jquery脚本从Facebook获取我的帖子,然后显示在我的网站上。 这是我使用的代码:
http://www.neosmart.de/social-media/facebook-wall
Facebook现在需要访问令牌才能访问您的Feed。 所以我在facebook登录下创建了一个应用程序,然后抓住了访问令牌。 一旦我通过访问令牌,它就会显示我网站上墙上的帖子。 然而,第二次我退出Facebook我的网站上的帖子不再显示,而是显示此错误:
Error validating access token: The session is invalid because the user logged out.
所以我的问题是从我的Facebook帐户获取访问令牌的正确步骤是什么,如果我登录到Facebook,我可以用来查看我的Facebook提要?
编辑:
这是一步一步解释如何通过离线访问授予我自己的应用程序权限并获取访问令牌。 一旦我按照这些步骤操作,我的Feed现在可以正常工作。
http://itslennysfault.com/get-facebook-access-token-for-graph-api
Im using a jquery script that grabs my posts from facebook and then displays on my site. Here is the code Im using:
http://www.neosmart.de/social-media/facebook-wall
Facebook now requires an access token in order to access your feed. So I created an app under my facebook login and then grabbed the access token. Once I pass the access token it shows the posts on my wall on my site. However the second I log out of Facebook the posts on my site no longer show, instead it shows this error:
Error validating access token: The session is invalid because the user logged out.
So my question is what are the proper steps to get an access token from my facebook account that I can use to view my facebook feed if Im logged into facebook or not?
EDIT:
This is a step by step explanation of what to do to grant myself permission to my own app with offline access and get the access token. Once I followed these steps my feed now works as it should.
http://itslennysfault.com/get-facebook-access-token-for-graph-api
原文:https://stackoverflow.com/questions/6697936
最满意答案
我不确定你想要做什么,但看起来你正在从图像到画布绘制每个像素。
如果确实如此,我建议您立刻绘制整个图像。
如果没有,我真的需要一个更详细的问题,或许对你的代码中的数学有更多的解释。
哦,不要忘记分号。
I´m unsure of what you´re trying to do but it looks like you´re drawing each pixel from the image to the canvas.
If that is indeed the case I suggest you just draw the whole image at once.
If not, I would really need a more elaborated question perhaps with more explanations on the math in your code.
Oh yes don´t forget semicolons.
相关问答
更多-
(重新)画在画布上((Re)drawing on a Canvas)[2022-06-24]
只需在paint事件开始时使用背景颜色填充Canvas 。 public void paintControl(PaintEvent event) { GC gc = event.gc; gc.setBackground(... background color ...); Rectangle fillRect = getClientArea(); gc.fillRectangle(fillRect); ... continue drawing } Just fill the ... -
调整大小后在画布上绘图(Drawing on canvas after resize)[2023-04-13]
要实际调整画布大小(如有更多像素 ),您需要设置宽度/高度属性。 jQuerys width()/height()设置css值。 导致拉伸的画布元素由与之前相同的像素数组成。 而是使用: $('#canvas').prop({ width: 400, // the 400 is just arbitrary height: 400 }); 或者,根据Alnitaks评论,您当然可以直接分配值: canvas.width = 400; canvas.height = 400; To actuall ... -
缩放后在画布上绘图(Drawing on canvas after zoom)[2021-09-08]
当您从 -
如何在Windows手机中使用鼠标拖动制作绘图画布(How to make a drawing canvas with Mouse Drag in windows phone)[2023-03-10]
看到我不能编码整个事情但这里有一个链接,可能有助于仔细检查它。 在画布上手机上画画 如果有任何混淆,请告诉我 See i Cant code the entire thing But here's a link that might help Go through it carefully. Drawing on canvas windows phone Let me know if any confusion -
如何缩放画布绘图(How to zoom a Canvas drawing)[2022-04-30]
像迈克所说,最好的解决方案是重绘它。 放大css是一种解决方案,但质量却有很大的损失。 Like Mike said, the best solution is to redraw it. Zooming in with css is a solution, but there's a big loss in quality. -
好吧,我想清楚是什么问题,这是drawRect函数中的错误。 drawRect函数需要更改为: canvas.drawRect(0, 0, ((float) mProgress/maxProgress) * getWidth(), getMeasureHeight(), mPaint); 因为mProgress是一个整数除以整数返回零,这就是问题所在。 Ok i figured out what was the problem, it was the mistake in drawRect functio ...
-
画布不允许绘图(Canvas does not allow drawing)[2023-02-03]
如果您需要使用其他画布,则必须分配HDC,例如 var WindowHandle:HWND; ScreenCanvas,BufferCanvas: TCanvas; r,r2: TRect; ScreenDC,BufferDC :HDC; BufferBitmap : HBITMAP; begin WindowHandle := 0; ScreenCanvas := TCanvas.Create; BufferCanvas := TCanvas.Create; Scre ... -
画到画布上(Drawing to the canvas)[2023-03-17]
正如人们所指出的那样,如果CalculateMyPixel()价格昂贵,那么称为150,000(HVGA)或384,00倍(WVGA)只会让你失望。 最重要的是,每次有更新时,尝试通过canvas.drawPoint()将UI绘制为单个像素,这是执行此操作的最低效方法。 如果您要绘制单个像素,您几乎肯定想要某种包含像素的离屏位图,您可以使用简单的Canvas.drawBitmap()绘制。 然后,您可以决定管理该位图的最佳方法。 最简单的方法是只创建一个所需大小的Bitmap对象,并使用那里的API来填充它 ... -
瓷砖地图绘图画布(Tile-Map drawing canvas)[2023-07-19]
我不确定你想要做什么,但看起来你正在从图像到画布绘制每个像素。 如果确实如此,我建议您立刻绘制整个图像。 如果没有,我真的需要一个更详细的问题,或许对你的代码中的数学有更多的解释。 哦,不要忘记分号。 I´m unsure of what you´re trying to do but it looks like you´re drawing each pixel from the image to the canvas. If that is indeed the case I suggest you j ... -
您可能想看看LinearGradient填充。 这是描述它是如何工作的。 它不是用纯色填充形状,而是用渐变图案填充它们。 然后,它只需要组合各种尺寸和图案的多种形状。 如果你想得到完全相同的颜色,你可能需要读取它们的rgb值并像我一样定义它们: Color.rgb(225, 229, 111) 这是我的尝试。 它并不完美,但它有点类似于你想要达到的目标。 摆弄颜色和大小,你将获得所需的结果,而不是给出绝对值,你可以参数化一些东西,例如阴影的大小,或正方形和内圆之间的空间,等等。 public class ...