小编Rik*_*oid的帖子

如何将我的图像传递到facebook feed对话框android

我正在使用以下代码在用户的墙上发布.

 Bundle params = new Bundle(); 
    params.putString("message", facebookMessage);
    params.putString("link", ComLabelConstants.FACEBOOK_LINK);
    params.putString("name", linkname); 
    params.putString("picture", "http://some link"); 
    params.putString("caption", ComLabelConstants.FACEBOOK_LINK_CAPTION);
    params.putString("description", "This is description"); 
     // displaying facebook dialogs
    mFacebook.dialog(FbookAlertBoxActivity.this, "feed", params,new SampleDialogListener(this, mAsyncRunner)); 
Run Code Online (Sandbox Code Playgroud)

现在,我想在drawable文件夹中使用我自己的图像在用户的墙上发布,而不是从任何链接发布.我们可以这样做吗?任何人都有解决方案.

android facebook

5
推荐指数
1
解决办法
3704
查看次数

服务工作者注册成功后出现“bad-precaching-response”错误

在我的项目中,我使用 NextJS+KOA+Apollo。我的 nextJS 应用程序位于根目录中的客户端内。我正在使用 next-offline 将其转换为 PWA。

Nextjs 应用程序位于客户端目录中。koa 服务器在服务器目录中。

当我通过以下命令构建应用程序时:

next build client && tsc --project tsconfig.server.json
Run Code Online (Sandbox Code Playgroud)

它在客户端内部为 nextjs 创建了一个构建目录,并在顶层为 koa 服务器创建了 dist 目录。

我通过以下命令在生产中运行代码

NODE_ENV=production node dist/server/index.js
Run Code Online (Sandbox Code Playgroud)

问题 Service Worker 正在正确注册。但我收到以下错误:

PrecacheController.mjs:194 
Uncaught (in promise) bad-precaching-response: bad-precaching-response :: [{"url":"https://my-domain/_next/bo.svg?__WB_REVISION__=e02afe0476bb357aebde18136fda06e0","status":404}] 
at l.o (https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-precaching.prod.js:1:1749) 
at async Promise.all (index 0) 
at async l.install (https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-precaching.prod.js:1:1221)
Run Code Online (Sandbox Code Playgroud)

在此处输入图片说明

下面是我生成的构建文件:

在此处输入图片说明

tsconfig.server.json

{
  "extends": "./tsconfig.json",
  "compilerOptions": {
    "module": "commonjs",
    "outDir": "dist",
    "target": "es2017",
    "isolatedModules": false,
    "noEmit": false
  },
  "include": ["server/**/*.ts"]
}
Run Code Online (Sandbox Code Playgroud)

下面是我的 next.config.js(在客户端目录中)

/* eslint-disable @typescript-eslint/no-var-requires */ …
Run Code Online (Sandbox Code Playgroud)

koa service-worker next.js

5
推荐指数
0
解决办法
1731
查看次数

标签 统计

android ×1

facebook ×1

koa ×1

next.js ×1

service-worker ×1